Entropy coding of motion vector differences

ABSTRACT

An entropy decoder is configured to, for horizontal and vertical components of motion vector differences, derive a truncated unary code from the data stream using context-adaptive binary entropy decoding with exactly one context per bin position of the truncated unary code, which is common for horizontal and vertical components of the motion vector differences, and an Exp-Golomb code using a constant equi-probability bypass mode to obtain the binarizations of the motion vector differences. A desymbolizer is configured to debinarize the binarizations of the motion vector difference syntax elements to obtain integer values of the horizontal and vertical components of the motion vector differences. A reconstructor is configured to reconstruct a video based on the integer values of the horizontal and vertical components of the motion vector differences.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/238,523 filed Aug. 16, 2016, which is a continuation of U.S. patentapplication Ser. No. 14/108,108, filed Dec. 16, 2013, which is acontinuation of International Application No. PCT/EP2012/061613, filedJun. 18, 2012, and additionally claims priority from U.S. ProvisionalPatent Application Nos. 61/497,794, filed Jun. 16, 2011 and 61/508,506,filed Jul. 15, 2011, which are all incorporated herein by reference intheir entirety.

BACKGROUND OF THE INVENTION

The present invention is concerned with an entropy coding concept forcoding video data.

Many video codecs are known in the art. Generally, these codecs reducethe amount of data necessitated in order to represent the video content,i.e. they compress the data. In the context of video coding, it is knownthat the compression of the video data is advantageously achieved bysequentially applying different coding techniques: motion-compensatedprediction is used in order to predict the picture content. The motionvectors determined in motion-compensated prediction as well as theprediction residuum are subject to lossless entropy coding. In order tofurther reduce the amount of data, the motion vectors themselves aresubject to prediction so that merely motion vector differencesrepresenting the motion vector prediction residuum, have to be entropyencoded. In H.264, for example, the just-outlined procedure is appliedin order to transmit the information on motion vector differences. Inparticular, the motion vector differences are binarized into bin stringscorresponding to a combination of a truncated unary code and, from acertain cutoff value on, an exponential Golomb code. While the bins ofthe exponential Golomb code are easily coded using an equi-probabilitybypass mode with fixed probability of 0.5, several contexts are providedfor the first bins. The cutoff value is chosen to be nine. Accordingly,a high amount of contexts is provided for coding the motion vectordifferences.

Providing a high number of contexts, however, not only increases codingcomplexity, but may also negatively affect the coding efficiency: if acontext is visited too rarely, the probability adaptation, i.e. theadaptation of the probability estimation associated with the respectivecontext during the cause of entropy coding, fails to performeffectively. Accordingly, the probability estimations appliedinappropriately estimate the actual symbol statistics. Moreover, if fora certain bin of the binarization, several contexts are provided, theselection thereamong may necessitate the inspection of neighboringbins/syntax element values whose necessity may hamper the execution ofthe decoding process. On the other hand, if the number of contexts isprovided too low, bins of highly varying actual symbol statistics aregrouped together within one context and accordingly, the probabilityestimation associated with that context fails to effectively encode thebins associated therewith.

There is an ongoing need to further increase the coding efficiency ofentropy coding of motion vector differences.

SUMMARY

According to an embodiment, a decoder for decoding a video from a datastream into which horizontal and vertical components of motion vectordifferences are coded using binarizations of the horizontal and verticalcomponents, the binarizations equaling a truncated unary code of thehorizontal and vertical components, respectively, within a firstinterval of the domain of the horizontal and vertical components below acutoff value, and a combination of a prefix in form of the truncatedunary code for the cutoff value and a suffix in form of a Exp-Golombcode of the horizontal and vertical components, respectively, within asecond interval of the domain of the horizontal and vertical componentsinclusive and above the cutoff value, wherein the cutoff value is twoand the Exp-Golomb code has order one, may have: an entropy decoderconfigured to, for the horizontal and vertical components of the motionvector differences, derive the truncated unary code from the data streamusing context-adaptive binary entropy decoding with exactly one contextper bin position of the truncated unary code, which is common for thehorizontal and vertical components of the motion vector differences, andthe Exp-Golomb code using a constant equi-probability bypass mode toobtain the binarizations of the motion vector differences; adesymbolizer configured to debinarize the binarizations of the motionvector difference syntax elements to obtain integer values of thehorizontal and vertical components of the motion vector differences; areconstructor configured to reconstruct the video based on the integervalues of the horizontal and vertical components of the motion vectordifferences.

According to another embodiment, an encoder for encoding a video into adata stream may have: a constructor configured to predictively code thevideo by motion compensated prediction using motion vectors andpredictively coding the motion vectors by predicting the motion vectorsand setting integer values of horizontal and vertical components ofmotion vector differences to represent a prediction error of thepredicted motion vectors; a symbolizer configured to binarize theinteger values to obtain binarizations of the horizontal and verticalcomponents of the motion vector differences, the binarizations equalinga truncated unary code of the horizontal and vertical components,respectively, within a first interval of the domain of the horizontaland vertical components below a cutoff value, and a combination of aprefix in form of the truncated unary code for the cutoff value and asuffix in form of a Exp-Golomb code of the horizontal and verticalcomponents, respectively, within a second interval of the domain of thehorizontal and vertical components inclusive and above the cutoff value,wherein the cutoff value is two and the Exp-Golomb code has order one;and an entropy encoder configured to, for the horizontal and verticalcomponents of the motion vector differences, encode the truncated unarycode into the data stream using context-adaptive binary entropy encodingwith exactly one context per bin position of the truncated unary code,which is common for the horizontal and vertical components of the motionvector differences, and the Exp-Golomb code using a constantequi-probability bypass mode.

According to another embodiment, a method for decoding a video from adata stream into which horizontal and vertical components of motionvector differences are coded using binarizations of the horizontal andvertical components, the binarizations equaling a truncated unary codeof the horizontal and vertical components, respectively, within a firstinterval of the domain of the horizontal and vertical components below acutoff value, and a combination of a prefix in form of the truncatedunary code for the cutoff value and a suffix in form of a Exp-Golombcode of the horizontal and vertical components, respectively, within asecond interval of the domain of the horizontal and vertical componentsinclusive and above the cutoff value, wherein the cutoff value is twoand the Exp-Golomb code has order one, may have the steps of: for thehorizontal and vertical components of the motion vector differences,deriving the truncated unary code from the data stream usingcontext-adaptive binary entropy decoding with exactly one context perbin position of the truncated unary code, which is common for thehorizontal and vertical components of the motion vector differences, andthe Exp-Golomb code using a constant equi-probability bypass mode toobtain the binarizations of the motion vector differences; debinarizingthe binarizations of the motion vector difference syntax elements toobtain integer values of the horizontal and vertical components of themotion vector differences; reconstructing the video based on the integervalues of the horizontal and vertical components of the motion vectordifferences. According to another embodiment, a method for encoding avideo into a data stream may have the steps of: predictively coding thevideo by motion compensated prediction using motion vectors andpredictively coding the motion vectors by predicting the motion vectorsand setting integer values of horizontal and vertical components ofmotion vector differences to represent a prediction error of thepredicted motion vectors; binarizing the integer values to obtainbinarizations of the horizontal and vertical components of the motionvector differences, the binarizations equaling a truncated unary code ofthe horizontal and vertical components, respectively, within a firstinterval of the domain of the horizontal and vertical components below acutoff value, and a combination of a prefix in form of the truncatedunary code for the cutoff value and a suffix in form of a Exp-Golombcode of the horizontal and vertical components, respectively, within asecond interval of the domain of the horizontal and vertical componentsinclusive and above the cutoff value, wherein the cutoff value is twoand the Exp-Golomb code has order one; and for the horizontal andvertical components of the motion vector differences, encoding thetruncated unary code into the data stream using context-adaptive binaryentropy encoding with exactly one context per bin position of thetruncated unary code, which is common for the horizontal and verticalcomponents of the motion vector differences, and the Exp-Golomb codeusing a constant equi-probability bypass mode.

Another embodiment may have a computer program having a program code forperforming, when running on a computer, the inventive methods.

A basic finding of the present invention is that the coding efficiencyof entropy coding of motion vector differences may further be increasedby reducing the cutoff value up to which the truncated unary code isused in order to binarize the motion vector differences, down to two sothat there are merely two bin positions of the truncated unary code, andif an order of one is used for the exponential Golomb code for thebinarization of the motion vector differences from the cutoff value onand if, additionally, exactly one context is provided for the two binpositions of the truncated unary code, respectively, so that contextselection based on bins or syntax element values of neighboring imageblocks is not necessitated and a too fine classification of the bins atthese bin positions into contexts is avoided so that probabilityadaptation works properly, and if the same contexts are used forhorizontal and vertical components thereby further reducing the negativeeffects of a too fine context subdivison.

Further, it has been found out that the just-mentioned settings withregard to the entropy coding of motion vector differences is especiallyvaluable when combining same with advanced methods of predicting themotion vectors and reducing the necessitated amount of motion vectordifferences to be transmitted. For example, multiple motion vectorpredictors may be provided so as to obtain an ordered list of motionvector predictors, and an index into this list of motion vectorpredictors may be used so as to determine the actual motion vectorpredictor the prediction residual of which is represented by the motionvector difference in question. Although the information on the listindex used has to be derivable from the data stream at the decodingside, the overall prediction quality of the motion vectors is increasedand accordingly, the magnitude of the motion vector differences isfurther reduced so that altogether, the coding efficiency is increasedfurther and the reduction of the cutoff value and the common use of thecontext for horizontal and vertical components of the motion vectordifferences fits to such an improved motion vector prediction. On theother hand, merging may be used in order to reduce the number of motionvector differences to be transmitted within the data stream: to thisend, merging information may be conveyed within the data streamsignaling to the decoder blocks of a subdivision of blocks which aregrouped into a group of blocks. The motion vector differences may thenbe transmitted within the data stream in units of these merged groupsinstead of the individual blocks, thereby reducing the number of motionvector differences having to be transmitted. As this clustering ofblocks reduces the inter-correlation between neighboring motion vectordifferences, the just-mentioned omittance of the provision of severalcontexts for one bin position prevents the entropy coding scheme from atoo fine classification into contexts depending on neighboring motionvector differences. Rather, the merging concept already exploits theinter-correlation between motion vector differences of neighboringblocks and accordingly, one context for one bin position—the same forhorizontal and vertical components—is sufficient.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention will be detailed subsequentlyreferring to the appended drawings, in which:

FIG. 1 shows a block diagram of an encoder according to an embodiment;

FIGS. 2A-2C schematically show different sub-divisions of a sample arraysuch as a picture into blocks;

FIG. 3 shows a block diagram of a decoder according to an embodiment;

FIG. 4 shows a block diagram of an encoder according to an embodiment inmore detail;

FIG. 5 shows a block diagram of a decoder according to an embodiment inmore detail;

FIG. 6 schematically illustrates a transform of a block from spatialdomain into spectral domain, the resulting transform block and itsretransformation;

FIG. 7 shows a bock diagram of an encoder according to an embodiment;

FIG. 8 shows a bock diagram of an decoder suitable for decodingbitstream generated by the encoder of FIG. 8, according to anembodiment;

FIG. 9 shows a schematic diagram illustrating a data packet withmultiplexed partial bitstreams according to an embodiment;

FIG. 10 shows a schematic diagram illustrating a data packet with analternative segmentation using fixed-size segments according to afurther embodiment;

FIG. 11 shows a decoder supporting mode switching according to anembodiment;

FIG. 12 shows a decoder supporting mode switching according to a furtherembodiment;

FIG. 13 shows an encoder fitting to decoder of FIG. 11 according to anembodiment;

FIG. 14 shows an encoder fitting to decoder of FIG. 12 according to anembodiment;

FIG. 15 shows mapping of pStateCtx and fullCtxState/256**E**.

FIG. 16 shows a decoder according to an embodiment of the presentinvention; and

FIG. 17 shows an encoder according to an embodiment of the presentinvention.

FIG. 18 schematically shows a motion vector difference binarization inaccordance with an embodiment of the present invention;

FIG. 19 schematically illustrates a merge concept in accordance with anembodiment; and

FIG. 20 schematically illustrates a motion vector prediction scheme inaccordance with an embodiment.

DETAILED DESCRIPTION OF THE INVENTION

It is noted that during the description of the figures, elementsoccurring in several of these Figures are indicated with the samereference sign in each of these Figures and a repeated description ofthese elements as far as the functionality is concerned is avoided inorder to avoid unnecessitated repetitions. Nevertheless, thefunctionalities and descriptions provided with respect to one figureshall also apply to other Figures unless the opposite is explicitlyindicated.

In the following, firstly, embodiments of a general video coding conceptare described, with respect to FIGS. 1 to 10. FIGS. 1 to 6 relate to thepart of the video codec operating on the syntax level. The followingFIGS. 8 to 10 relate to embodiments for the part of the code relating tothe conversion of the syntax element stream to the data stream and viceversa. Then, specific aspects and embodiments of the present inventionare described in form of possible implementations of the general conceptrepresentatively outlined with regard to FIGS. 1 to 10.

FIG. 1 shows an example for an encoder 10 in which aspects of thepresent application may be implemented.

The encoder encodes an array of information samples 20 into a datastream. The array of information samples may represent informationsamples corresponding to, for example, brightness values, color values,luma values, chroma values or the like. However, the information samplesmay also be depth values in case of the sample array 20 being a depthmap generated by, for example, a time of light sensor or the like.

The encoder 10 is a block-based encoder. That is, encoder 10 encodes thesample array 20 into the data stream 30 in units of blocks 40. Theencoding in units of blocks 40 does not necessarily mean that encoder 10encodes these blocks 40 totally independent from each other. Rather,encoder 10 may use reconstructions of previously encoded blocks in orderto extrapolate or intra-predict remaining blocks, and may use thegranularity of the blocks for setting coding parameters, i.e. forsetting the way each sample array region corresponding to a respectiveblock is coded.

Further, encoder 10 is a transform coder. That is, encoder 10 encodesblocks 40 by using a transform in order to transfer the informationsamples within each block 40 from spatial domain into spectral domain. Atwo-dimensional transform such as a DCT of FFT or the like may be used.The blocks 40 are of quadratic shape or rectangular shape.

The sub-division of the sample array 20 into blocks 40 shown in FIG. 1merely serves for illustration purposes. FIG. 1 shows the sample array20 as being sub-divided into a regular two-dimensional arrangement ofquadratic or rectangular blocks 40 which abut to each other in anon-overlapping manner. The size of the blocks 40 may be predetermined.That is, encoder 10 may not transfer an information on the block size ofblocks 40 within the data stream 30 to the decoding side. For example,the decoder may expect the predetermined block size.

However, several alternatives are possible. For example, the blocks mayoverlap each other. The overlapping may, however, be restricted to suchan extent that each block has a portion not overlapped by anyneighboring block, or such that each sample of the blocks is overlappedby, at the maximum, one block among the neighboring blocks arranged injuxtaposition to the current block along a predetermined direction. Thelatter would mean that the left and right hand neighbor blocks mayoverlap the current block so as to fully cover the current block butthey may not overlay each other, and the same applies for the neighborsin vertical and diagonal direction.

As a further alternative, the sub-division of sample array 20 intoblocks 40 may be adapted to the content of the sample array 20 by theencoder 10 with the sub-division information on the sub-division usedbeing transferred to the decoder side via bitstream 30.

FIGS. 2A to 2C show different examples for a sub-division of a samplearray 20 into blocks 40. FIG. 2A shows a quadtree-based sub-division ofa sample array 20 into blocks 40 of different sizes, with representativeblocks being indicated at 40 a, 40 b, 40 c and 40 d with increasingsize. In accordance with the sub-division of FIG. 2A, the sample array20 is firstly divided into a regular two-dimensional arrangement of treeblocks 40 d which, in turn, have individual sub-division informationassociated therewith according to which a certain tree block 40 d may befurther sub-divided according to a quadtree structure or not. The treeblock to the left of block 40 d is exemplarily sub-divided into smallerblocks in accordance with a quadtree structure. The encoder 10 mayperform one two-dimensional transform for each of the blocks shown withsolid and dashed lines in FIG. 2A. In other words, encoder 10 maytransform the array 20 in units of the block subdivision.

Instead of a quadtree-based sub-division a more general multi tree-basedsub-division may be used and the number of child nodes per hierarchylevel may differ between different hierarchy levels.

FIG. 2B shows another example for a sub-division. In accordance withFIG. 2B, the sample array 20 is firstly divided into macroblocks 40 barranged in a regular two-dimensional arrangement in a non-overlappingmutually abutting manner wherein each macroblock 40 b has associatedtherewith sub-division information according to which a macroblock isnot sub-divided, or, if subdivided, sub-divided in a regulartwo-dimensional manner into equally-sized sub-blocks so as to achievedifferent sub-division granularities for different macroblocks. Theresult is a sub-division of the sample array 20 in differently-sizedblocks 40 with representatives of the different sizes being indicated at40 a, 40 b and 40 a′. As in FIG. 2A, the encoder 10 performs atwo-dimensional transform on each of the blocks shown in FIG. 2B withthe solid and dashed lines. FIG. 2C will be discussed later.

FIG. 3 shows a decoder 50 being able to decode the data stream 30generated by encoder 10 to reconstruct a reconstructed version 60 of thesample array 20. Decoder 50 extracts from the data stream 30 thetransform coefficient block for each of the blocks 40 and reconstructsthe reconstructed version 60 by performing an inverse transform on eachof the transform coefficient blocks.

Encoder 10 and decoder 50 may be configured to perform entropyencoding/decoding in order to insert the information on the transformcoefficient blocks into, and extract this information from the datastream, respectively. Details in this regard in accordance withdifferent ambodiments are described later. It should be noted that thedata stream 30 not necessarily comprises information on transformcoefficient blocks for all the blocks 40 of the sample array 20. Rather,as sub-set of blocks 40 may be coded into the bitstream 30 in anotherway. For example, encoder 10 may decide to refrain from inserting atransform coefficient block for a certain block of blocks 40 withinserting into the bitstream 30 alternative coding parameters insteadwhich enable the decoder 50 to predict or otherwise fill the respectiveblock in the reconstructed version 60. For example, encoder 10 mayperform a texture analysis in order to locate blocks within sample array20 which may be filled at the decoder side by decoder by way of texturesynthesis and indicate this within the bitstream accordingly.

As discussed with respect to the following Figures, the transformcoefficient blocks not necessarily represent a spectral domainrepresentation of the original information samples of a respective block40 of the sample array 20. Rather, such a transform coefficient blockmay represent a spectral domain representation of a prediction residualof the respective block 40. FIG. 4 shows an embodiment for such anencoder. The encoder of FIG. 4 comprises a transform stage 100, anentropy coder 102, an inverse transform stage 104, a predictor 106 and asubtractor 108 as well as an adder 110. Subtractor 108, transform stage100 and entropy coder 102 are serially connected in the order mentionedbetween an input 112 and an output 114 of the encoder of FIG. 4. Theinverse transform stage 104, adder 110 and predictor 106 are connectedin the order mentioned between the output of transform stage 100 and theinverting input of subtractor 108, with the output of predictor 106 alsobeing connected to a further input of adder 110.

The coder of FIG. 4 is a predictive transform-based block coder. Thatis, the blocks of a sample array 20 entering input 112 are predictedfrom previously encoded and reconstructed portions of the same samplearray 20 or previously coded and reconstructed other sample arrays whichmay precede or succeed the current sample array 20 in presentation time.The prediction is performed by predictor 106. Subtractor 108 subtractsthe prediction from such a original block and the transform stage 100performs a two-dimensional transformation on the prediction residuals.The two-dimensional transformation itself or a subsequent measure insidetransform stage 100 may lead to a quantization of the transformationcoefficients within the transform coefficient blocks. The quantizedtransform coefficient blocks are losslessly coded by, for example,entropy encoding within entropy encoder 102 with the resulting datastream being output at output 114. The inverse transform stage 104reconstructs the quantized residual and adder 110, in turn, combines thereconstructed residual with the corresponding prediction in order toobtain reconstructed information samples based on which predictor 106may predict the afore-mentioned currently encoded prediction blocks.Predictor 106 may use different prediction modes such as intraprediction modes and inter prediction modes in order to predict theblocks and the prediction parameters are forwarded to entropy encoder102 for insertion into the data stream. For each inter-predictedprediction block, respective motion data is inserted into the bitstreamvia entropy encoder 114 in order to enable the decoding side to redo theprediction. The motion data for a prediction block of a picture mayinvolve a syntax portion including a syntax element representing amotion vector difference differentially coding the motion vector for thecurrent prediction block relative to a motion vector predictor derived,for example, by way of a prescribed method from the motion vectors ofneighboring already encoded prediction blocks.

That is, in accordance with the embodiment of FIG. 4, the transformcoefficient blocks represent a spectral representation of a residual ofthe sample array rather than actual information samples thereof That is,in accordance with the embodiment of FIG. 4, a sequence of syntaxelements may enter entropy encoder 102 for being entropy encoded intodata stream 114. The sequence of syntax elements may comprise motionvector difference syntax elements for inter-prediction blocks and syntaxelements concerning a significance map indicating positions ofsignificant transform coefficient levels as well as syntax elementsdefining the significant transform coefficient levels themselves, fortransform blocks.

It should be noted that several alternatives exist for the embodiment ofFIG. 4 with some of them having been described within the introductoryportion of the specification which description is incorporated into thedescription of FIG. 4 herewith.

FIG. 5 shows a decoder able to decode a data stream generated by theencoder of FIG. 4. The decoder of FIG. 5 comprises an entropy decoder150, an inverse transform stage 152, an adder 154 and a predictor 156.Entropy decoder 150, inverse transform stage 152, and adder 154 areserially connected between an input 158 and an output 160 of the decoderof FIG. 5 in the order mentioned. A further output of entropy decoder150 is connected to predictor 156 which, in turn, is connected betweenthe output of adder 154 and a further input thereof The entropy decoder150 extracts, from the data stream entering the decoder of FIG. 5 atinput 158, the transform coefficient blocks wherein an inverse transformis applied to the transform coefficient blocks at stage 152 in order toobtain the residual signal. The residual signal is combined with aprediction from predictor 156 at adder 154 so as to obtain areconstructed block of the reconstructed version of the sample array atoutput 160. Based on the reconstructed versions, predictor 156 generatesthe predictions thereby rebuilding the predictions performed bypredictor 106 at the encoder side. In order to obtain the samepredictions as those used at the encoder side, predictor 156 uses theprediction parameters which the entropy decoder 150 also obtains fromthe data stream at input 158.

It should be noted that in the above-described embodiments, the spatialgranularity at which the prediction and the transformation of theresidual is performed, do not have to be equal to each other. This isshown in FIG. 2C. This figure shows a sub-division for the predictionblocks of the prediction granularity with solid lines and the residualgranularity with dashed lines. As can be seen, the subdivisions may beselected by the encoder independent from each other. To be more precise,the data stream syntax may allow for a definition of the residualsubdivision independent from the prediction subdivision. Alternatively,the residual subdivision may be an extension of the predictionsubdivision so that each residual block is either equal to or a propersubset of a prediction block. This is shown on FIG. 2A and FIG. 2B, forexample, where again the prediction granularity is shown with solidlines and the residual granularity with dashed lines. That is, in FIG.2A-2C, all blocks having a reference sign associated therewith would beresidual blocks for which one two-dimensional transform would beperformed while the greater solid line blocks encompassing the dashedline blocks 40 a, for example, would be prediction blocks for which aprediction parameter setting is performed individually.

The above embodiments have in common that a block of (residual ororiginal) samples is to be transformed at the encoder side into atransform coefficient block which, in turn, is to be inverse transformedinto a reconstructed block of samples at the decoder side. This isillustrated in FIG. 6. FIG. 6 shows a block of samples 200. In case ofFIG. 6, this block 200 is exemplarily quadratic and 4×4 samples 202 insize. The samples 202 are regularly arranged along a horizontaldirection x and vertical direction y. By the above-mentionedtwo-dimensional transform T, block 200 is transformed into spectraldomain, namely into a block 204 of transform coefficients 206, thetransform block 204 being of the same size as block 200. That is,transform block 204 has as many transform coefficients 206 as block 200has samples, in both horizontal direction and vertical direction.However, as transform T is a spectral transformation, the positions ofthe transform coefficients 206 within transform block 204 do notcorrespond to spatial positions but rather to spectral components of thecontent of block 200. In particular, the horizontal axis of transformblock 204 corresponds to an axis along which the spectral frequency inthe horizontal direction monotonically increases while the vertical axiscorresponds to an axis along which the spatial frequency in the verticaldirection monotonically increases wherein the DC component transformcoefficient is positioned in a corner—here exemplarily the top leftcorner—of block 204 so that at the bottom right-hand corner, thetransform coefficient 206 corresponding to the highest frequency in bothhorizontal and vertical direction is positioned. Neglecting the spatialdirection, the spatial frequency to which a certain transformcoefficient 206 belongs, generally increases from the top left corner tothe bottom right-hand corner. By an inverse transform T⁻¹, the transformblock 204 is re-transferred from spectral domain to spatial domain, soas to re-obtain a copy 208 of block 200. In case no quantization/losshas been introduced during the transformation, the reconstruction wouldbe perfect.

As already noted above, it may be seen from FIG. 6 that greater blocksizes of block 200 increase the spectral resolution of the resultingspectral representation 204. On the other hand, quantization noise tendsto spread over the whole block 208 and thus, abrupt and very localizedobjects within blocks 200 tend to lead to deviations of there-transformed block relative to the original block 200 due toquantization noise. The main advantage of using greater blocks is,however, that the ratio between the number of significant, i.e. non-zero(quantized) transform coefficients, i.e. levels, on the one hand and thenumber of insignificant transform coefficients on the other hand may bedecreased within larger blocks compared to smaller blocks therebyenabling a better coding efficiency. In other words, frequently, thesignificant transform coefficient levels, i.e. the transformcoefficients not quantized to zero, are distributed over the transformblock 204 sparsely. Due to this, in accordance with the embodimentsdescribed in more detail below, the positions of the significanttransform coefficient levels is signaled within the data stream by wayof a significance map. Separately therefrom, the values of thesignificant transform coefficient, i.e., the transform coefficientlevels in case of the transform coefficients being quantized, aretransmitted within the data stream.

All the encoders and decoders described above, are, thus, configured todeal with a certain syntax of syntax elements. That is, theafore-mentioned syntax elements such as the transform coefficientlevels, syntax elements concerning the significance map of transformblocks, the motion data syntax elements concerning inter-predictionblocks and so on are assumed to be sequentially arranged within the datastream in a prescribed way. Such a prescribed way may be represented inform of a pseudo code as it is done, for example, in the H.264 standardor other video codecs.

In even other words, the above description, primarily dealt with theconversion of media data, here exemplarily video data, to a sequence ofsyntax elements in accordance with a predefined syntax structureprescribing certain syntax element types, its semantics and the orderamong them. The entropy encoder and entropy decoder of FIGS. 4 and 5,may be configured to operate, and may be structured, as outlined next.Same are responsible for performing the conversion between syntaxelement sequence and data stream, i.e. symbol or bit stream.

An entropy encoder according to an embodiment is illustrated in FIG. 7.The encoder losslessly converts a stream of syntax elements 301 into aset of two or more partial bitstreams 312.

In an embodiment of the invention, each syntax element 301 is associatedwith a category of a set of one or more categories, i.e. a syntaxelement type. As an example, the categories can specify the type of thesyntax element. In the context of hybrid video coding, a separatecategory may be associated with macroblock coding modes, block codingmodes, reference picture indices, motion vector differences, subdivisionflags, coded block flags, quantization parameters, transform coefficientlevels, etc. In other application areas such as audio, speech, text,document, or general data coding, different categorizations of syntaxelements are possible.

In general, each syntax element can take a value of a finite orcountable infinite set of values, where the set of possible syntaxelement values can differ for different syntax element categories. Forexample, there are binary syntax elements as well as integer-valuedones.

For reducing the complexity of the encoding and decoding algorithm andfor allowing a general encoding and decoding design for different syntaxelements and syntax element categories, the syntax elements 301 areconverted into ordered sets of binary decisions and these binarydecisions are then processed by simple binary coding algorithms.Therefore, the binarizer 302 bijectively maps the value of each syntaxelement 301 onto a sequence (or string or word) of bins 303. Thesequence of bins 303 represents a set of ordered binary decisions. Eachbin 303 or binary decision can take one value of a set of two values,e.g. one of the values 0 and 1. The binarization scheme can be differentfor different syntax element categories. The binarization scheme for aparticular syntax element category can depend on the set of possiblesyntax element values and/or other properties of the syntax element forthe particular category.

Table 1 illustrates three example binarization schemes for countableinfinite sets. Binarization schemes for countable infinite sets can alsobe applied for finite sets of syntax element values. In particular forlarge finite sets of syntax element values, the inefficiency (resultingfrom unused sequences of bins) can be negligible, but the universalityof such binarization schemes provides an advantage in terms ofcomplexity and memory requirements. For small finite sets of syntaxelement values, it is often advantageous (in terms of coding efficiency)to adapt the binarization scheme to the number of possible symbolvalues.

Table 2 illustrates three example binarization schemes for finite setsof 8 values. Binarization schemes for finite sets can be derived fromthe universal binarization schemes for countable infinite sets bymodifying some sequences of bins in a way that the finite sets of binsequences represent a redundancy-free code (and potentially reorderingthe bin sequences). As an example, the truncated unary binarizationscheme in Table 2 was created by modifying the bin sequence for thesyntax element 7 of the universal unary binarization (see Table 1). Thetruncated and reordered Exp-Golomb binarization of order 0 in Table 2was created by modifying the bin sequence for the syntax element 7 ofthe universal Exp-Golomb order 0 binarization (see Table 1) and byreordering the bin sequences (the truncated bin sequence for symbol 7was assigned to symbol 1). For finite sets of syntax elements, it isalso possible to use non-systematic/non-universal binarization schemes,as exemplified in the last column of Table 2.

TABLE 1 Binarization examples for countable infinite sets (or largefinite sets). Unary Ex-Golomb order 0 Exp-Golomb order 1 Symbol valuebinarization binarization binarization 0 1 1 10 1 01 010 11 2 001 0110100 3 0001 0010 0 0101 4 0000 1   0010 1 0110 5 0000 01  0011 0 0111 60000 001  0011 1 0010 00 7 0000 0001  0001 000 0010 01 . . . . . . . . .. . .

TABLE 2 Binarization examples for finite sets. Truncated and reorderedExp- Truncated unary Golomb order Non-systematic Symbol valuebinarization 0 binarization binarization 0 1 1 000 1 01 000 001 2 001010 01 3 0001 011 1000 4 0000 1  0010 0 1001 5 0000 01  0010 1 1010 60000 001 0011 0 1011 0 7 0000 000 0011 1 1011 1

Each bin 303 of the sequence of bins created by the binarizer 302 is fedinto the parameter assigner 304 in sequential order. The parameterassigner assigns a set of one or more parameters to each bin 303 andoutputs the bin with the associated set of parameters 305. The set ofparameters is determined in exactly the same way at encoder and decoder.The set of parameters may consist of one or more of the followingparameters:

In particular, parameter assigner 304 may be configured to assign to acurrent bin 303 a context model. For example, parameter assigner 304 mayselect one of available context indices for the current bin 303. Theavailable set of contexts for a current bin 303 may depend on the typeof the bin which, in turn, may be defined by the type/category of thesyntax element 301, the binarization of which the current bin 303 ispart of, and a position of the current bin 303 within the latterbinarization. The context selection among the available context set maydepend on previous bins and the syntax elements associated with thelatter. Each of these contexts has a probability model associatedtherewith, i.e. a measure for an estimate of the probability for one ofthe two possible bin values for the current bin. The probability modelmay in particular be a measure for an estimate of the probability forthe less probable or more probable bin value for the current bin, with aprobability model additionally being defined by an identifier specifyingan estimate for which of the two possible bin values represents the lessprobable or more probable bin value for the current bin 303. In case ofmerely one context being available for the current bin, the contextselection may be left away. As will be outlined in more detail below,parameter assigner 304 may also perform a probability model adaptationin order to adapt the probability models associated with the variouscontexts to the actual bin statistics of the respective bins belongingto the respective contexts.

As will also be described in more detail below, parameter assigner 304may operate differently depending on a high efficiency (HE) mode or lowcomplexity (LC) mode being activated. In both modes the probabilitymodel associates the current bin 303 to any of the bin encoders 310 aswill be outlined below, but the mode of operation of the parameterassigner 304 tends to be less complex in the LC mode with, however, thecoding efficiency being increased in the high efficiency mode due to theparameter assigner 304 causing the association of the individual bins303 to the individual encoders 310 to be more accurately adapted to thebin statistics, thereby optimizing the entropy relative to the LC mode.

Each bin with an associated set of parameters 305 that is output of theparameter assigner 304 is fed into a bin buffer selector 306. The binbuffer selector 306 potentially modifies the value of the input bin 305based on the input bin value and the associated parameters 305 and feedsthe output bin 307—with a potentially modified value—into one of two ormore bin buffers 308. The bin buffer 308 to which the output bin 307 issent is determined based on the value of the input bin 305 and/or thevalue of the associated parameters 305.

In an embodiment of the invention, the bin buffer selector 306 does notmodify the value of the bin, i.e., the output bin 307 has the same valueas the input bin 305. In a further embodiment of the invention, the binbuffer selector 306 determines the output bin value 307 based on theinput bin value 305 and the associated measure for an estimate of theprobability for one of the two possible bin values for the current bin.In an embodiment of the invention, the output bin value 307 is set equalto the input bin value 305 if the measure for the probability for one ofthe two possible bin values for the current bin is less than (or lessthan or equal to) a particular threshold; if the measure for theprobability for one of the two possible bin values for the current binis greater than or equal to (or greater than) a particular threshold,the output bin value 307 is modified (i.e., it is set to the opposite ofthe input bin value). In a further embodiment of the invention, theoutput bin value 307 is set equal to the input bin value 305 if themeasure for the probability for one of the two possible bin values forthe current bin is greater than (or greater than or equal to) aparticular threshold; if the measure for the probability for one of thetwo possible bin values for the current bin is less than or equal to (orless than) a particular threshold, the output bin value 307 is modified(i.e., it is set to the opposite of the input bin value). In anembodiment of the invention, the value of the threshold corresponds to avalue of 0.5 for the estimated probability for both possible bin values.

In a further embodiment of the invention, the bin buffer selector 306determines the output bin value 307 based on the input bin value 305 andthe associated identifier specifying an estimate for which of the twopossible bin values represents the less probable or more probable binvalue for the current bin. In an embodiment of the invention, the outputbin value 307 is set equal to the input bin value 305 if the identifierspecifies that the first of the two possible bin values represents theless probable (or more probable) bin value for the current bin, and theoutput bin value 307 is modified (i.e., it is set to the opposite of theinput bin value) if identifier specifies that the second of the twopossible bin values represents the less probable (or more probable) binvalue for the current bin.

In an embodiment of the invention, the bin buffer selector 306determines the bin buffer 308 to which the output bin 307 is sent basedon the associated measure for an estimate of the probability for one ofthe two possible bin values for the current bin. In an embodiment of theinvention, the set of possible values for the measure for an estimate ofthe probability for one of the two possible bin values is finite and thebin buffer selector 306 contains a table that associates exactly one binbuffer 308 with each possible value for the estimate of the probabilityfor one of the two possible bin values, where different values for themeasure for an estimate of the probability for one of the two possiblebin values can be associated with the same bin buffer 308. In a furtherembodiment of the invention, the range of possible values for themeasure for an estimate of the probability for one of the two possiblebin values is partitioned into a number of intervals, the bin bufferselector 306 determines the interval index for the current measure foran estimate of the probability for one of the two possible bin values,and the bin buffer selector 306 contains a table that associates exactlyone bin buffer 308 with each possible value for the interval index,where different values for the interval index can be associated with thesame bin buffer 308. In an embodiment of the invention, input bins 305with opposite measures for an estimate of the probability for one of thetwo possible bin values (opposite measure are those which representprobability estimates P and 1−P) are fed into the same bin buffer 308.In a further embodiment of the invention, the association of the measurefor an estimate of the probability for one of the two possible binvalues for the current bin with a particular bin buffer is adapted overtime, e.g. in order to ensure that the created partial bitstreams havesimilar bit rates. Further below, the interval index will also be calledpipe index, while the pipe index along with a refinement index and aflag indicating the more probable bin value indexes the actualprobability model, i.e. the probability estimate.

In a further embodiment of the invention, the bin buffer selector 306determines the bin buffer 308 to which the output bin 307 is sent basedon the associated measure for an estimate of the probability for theless probable or more probable bin value for the current bin. In anembodiment of the invention, the set of possible values for the measurefor an estimate of the probability for the less probable or moreprobable bin value is finite and the bin buffer selector 306 contains atable that associates exactly one bin buffer 308 with each possiblevalue of the estimate of the probability for the less probable or moreprobable bin value, where different values for the measure for anestimate of the probability for the less probable or more probable binvalue can be associated with the same bin buffer 308. In a furtherembodiment of the invention, the range of possible values for themeasure for an estimate of the probability for the less probable or moreprobable bin value is partitioned into a number of intervals, the binbuffer selector 306 determines the interval index for the currentmeasure for an estimate of the probability for the less probable or moreprobable bin value, and the bin buffer selector 306 contains a tablethat associates exactly one bin buffer 308 with each possible value forthe interval index, where different values for the interval index can beassociated with the same bin buffer 308. In a further embodiment of theinvention, the association of the measure for an estimate of theprobability for the less probable or more probable bin value for thecurrent bin with a particular bin buffer is adapted over time, e.g. inorder to ensure that the created partial bitstreams have similar bitrates.

Each of the two or more bin buffers 308 is connected with exactly onebin encoder 310 and each bin encoder is only connected with one binbuffer 308. Each bin encoder 310 reads bins from the associated binbuffer 308 and converts a sequence of bins 309 into a codeword 311,which represents a sequence of bits. The bin buffers 308 representfirst-in-first-out buffers; bins that are fed later (in sequentialorder) into a bin buffer 308 are not encoded before bins that are fedearlier (in sequential order) into the bin buffer. The codewords 311that are output of a particular bin encoder 310 are written to aparticular partial bitstream 312. The overall encoding algorithmconverts syntax elements 301 into two or more partial bitstreams 312,where the number of partial bitstreams is equal to the number of binbuffers and bin encoders. In an embodiment of the invention, a binencoder 310 converts a variable number of bins 309 into a codeword 311of a variable number of bits. One advantage of the above- andbelow-outlined embodiments of the invention is that the encoding of binscan be done in parallel (e.g. for different groups of probabilitymeasures), which reduces the processing time for severalimplementations.

Another advantage of embodiments of the invention is that the binencoding, which is done by the bin encoders 310, can be specificallydesigned for different sets of parameters 305. In particular, the binencoding and encoding can be optimized (in terms of coding efficiencyand/or complexity) for different groups of estimated probabilities. Onthe one hand side, this allows a reduction of the encoding/decodingcomplexity, and on the other hand side, it allows an improvement of thecoding efficiency. In an embodiment of the invention, the bin encoders310 implement different encoding algorithms (i.e. mapping of binsequences onto codewords) for different groups of measures for anestimate of the probability for one of the two possible bin values 305for the current bin. In a further embodiment of the invention, the binencoders 310 implement different encoding algorithms for differentgroups of measures for an estimate of the probability for the lessprobable or more probable bin value for the current bin.

In an embodiment of the invention, the bin encoders 310—or one or moreof the bin encoders—represent entropy encoders that directly mapsequences of input bins 309 onto codewords 310. Such mappings can beefficiently implemented and don't necessitate a complex arithmeticcoding engine. The inverse mapping of codewords onto sequences of bins(as done in the decoder) should to be unique in order to guaranteeperfect decoding of the input sequence, but the mapping of bin sequences309 onto codewords 310 doesn't necessarily need to be unique, i.e., itis possible that a particular sequence of bins can be mapped onto morethan one sequence of codewords. In an embodiment of the invention, themapping of sequences of input bins 309 onto codewords 310 is bijective.In a further embodiment of the invention, the bin encoders 310—or one ormore of the bin encoders—represent entropy encoders that directly mapvariable-length sequences of input bins 309 onto variable-lengthcodewords 310. In an embodiment of the invention, the output codewordsrepresent redundancy-free codes such as general huffman codes orcanonical huffman codes.

Two examples for the bijective mapping of bin sequences toredundancy-free codes are illustrated in Table 3. In a furtherembodiment of the invention, the output codewords represent redundantcodes suitable for error detection and error recovery. In a furtherembodiment of the invention, the output codewords represent encryptioncodes suitable for encrypting the syntax elements.

TABLE 3 Examples for mappings between bin sequences and codewords.Sequence of binds (bin order Codewords (bits orders is from left toright) is from left to right)   0000 0000 1   0000 0001 0000  0000 0010001  0000 01 0010 0000 1 0011 0001 0100 001 0101 01 0110 1 0111 Sequentof bins (bin order Codewords (bits order is from left to right) is fromleft to right) 000 10 01 11 001 010 11 011 1000 0 0001 1001 0010 10100011 1000 1 0000 0 1011 0000 1

In a further embodiment of the invention, the bin encoders 310—or one ormore of the bin encoders—represent entropy encoders that directly mapvariable-length sequences of input bins 309 onto fixed-length codewords310. In a further embodiment of the invention, the bin encoders 310—orone or more of the bin encoders—represent entropy encoders that directlymap fixed-length sequences of input bins 309 onto variable-lengthcodewords 310.

The decoder according an embodiment of the invention is illustrated inFIG. 8. The decoder performs basically the inverse operations of theencoder, so that the (previously encoded) sequence of syntax elements327 is decoded from a set of two or more partial bitstreams 324. Thedecoder includes two different process flows: A flow for data requests,which replicates the data flow of the encoder, and a data flow, whichrepresents the inverse of the encoder data flow. In the illustration inFIG. 8, the dashed arrows represent the data request flow, while thesolid arrows represent the data flow. The building blocks of the decoderbasically replicate the building blocks of the encoder, but implementthe inverse operations.

The decoding of a syntax element is triggered by a request for a newdecoded syntax element 313 that is sent to the binarizer 314. In anembodiment of the invention, each request for a new decoded syntaxelement 313 is associated with a category of a set of one or morecategories. The category that is associated with a request for a syntaxelement is the same as the category that was associated with thecorresponding syntax element during encoding.

The binarizer 314 maps the request for a syntax element 313 into one ormore requests for a bin that are sent to the parameter assigner 316. Asfinal response to a request for a bin that is sent to the parameterassigner 316 by the binarizer 314, the binarizer 314 receives a decodedbin 326 from the bin buffer selector 318. The binarizer 314 compares thereceived sequence of decoded bins 326 with the bin sequences of aparticular binarization scheme for the requested syntax element and, ifthe received sequence of decoded bins 26 matches the binarization of asyntax element, the binarizer empties its bin buffer and outputs thedecoded syntax element as final response to the request for a newdecoded symbol. If the already received sequence of decoded bins doesnot match any of the bin sequences for the binarization scheme for therequested syntax element, the binarizer sends another request for a binto the parameter assigner until the sequence of decoded bins matches oneof the bin sequences of the binarization scheme for the requested syntaxelement. For each request for a syntax element, the decoder uses thesame binarization scheme that was used for encoding the correspondingsyntax element. The binarization scheme can be different for differentsyntax element categories. The binarization scheme for a particularsyntax element category can depend on the set of possible syntax elementvalues and/or other properties of the syntax elements for the particularcategory.

The parameter assigner 316 assigns a set of one or more parameters toeach request for a bin and sends the request for a bin with theassociated set of parameters to the bin buffer selector. The set ofparameters that are assigned to a requested bin by the parameterassigner is the same that was assigned to the corresponding bin duringencoding. The set of parameters may consist of one or more of theparameters that are mentioned in the encoder description of FIG. 7.

In an embodiment of the invention, the parameter assigner 316 associateseach request for a bin with the same parameters as assigner 304 did,i.e. a context and its associated measure for an estimate of theprobability for one of the two possible bin values for the currentrequested bin, such as a measure for an estimate of the probability forthe less probable or more probable bin value for the current requestedbin and an identifier specifying an estimate for which of the twopossible bin values represents the less probable or more probable binvalue for the current requested bin.

The parameter assigner 316 may determine one or more of the abovementioned probability measures (measure for an estimate of theprobability for one of the two possible bin values for the currentrequested bin, measure for an estimate of the probability for the lessprobable or more probable bin value for the current requested bin,identifier specifying an estimate for which of the two possible binvalues represents the less probable or more probable bin value for thecurrent requested bin) based on a set of one or more already decodedsymbols. The determination of the probability measures for a particularrequest for a bin replicates the process at the encoder for thecorresponding bin. The decoded symbols that are used for determining theprobability measures can include one or more already decoded symbols ofthe same symbol category, one or more already decoded symbols of thesame symbol category that correspond to data sets (such as blocks orgroups of samples) of neighboring spatial and/or temporal locations (inrelation to the data set associated with the current request for asyntax element), or one or more already decoded symbols of differentsymbol categories that correspond to data sets of the same and/orneighboring spatial and/or temporal locations (in relation to the dataset associated with the current request for a syntax element).

Each request for a bin with an associated set of parameters 317 that isoutput of the parameter assigner 316 is fed into a bin buffer selector318. Based on the associated set of parameters 317, the bin bufferselector 318 sends a request for a bin 319 to one of two or more binbuffers 320 and receives a decoded bin 325 from the selected bin buffer320. The decoded input bin 325 is potentially modified and the decodedoutput bin 326—with a potentially modified value—is send to thebinarizer 314 as final response to the request for a bin with anassociated set of parameters 317.

The bin buffer 320 to which the request for a bin is forwarded isselected in the same way as the bin buffer to which the output bin ofthe bin buffer selector at the encoder side was sent.

In an embodiment of the invention, the bin buffer selector 318determines the bin buffer 320 to which the request for a bin 319 is sentbased on the associated measure for an estimate of the probability forone of the two possible bin values for the current requested bin. In anembodiment of the invention, the set of possible values for the measurefor an estimate of the probability for one of the two possible binvalues is finite and the bin buffer selector 318 contains a table thatassociates exactly one bin buffer 320 with each possible value of theestimate of the probability for one of the two possible bin values,where different values for the measure for an estimate of theprobability for one of the two possible bin values can be associatedwith the same bin buffer 320. In a further embodiment of the invention,the range of possible values for the measure for an estimate of theprobability for one of the two possible bin values is partitioned into anumber of intervals, the bin buffer selector 318 determines the intervalindex for the current measure for an estimate of the probability for oneof the two possible bin values, and the bin buffer selector 318 containsa table that associates exactly one bin buffer 320 with each possiblevalue for the interval index, where different values for the intervalindex can be associated with the same bin buffer 320. In an embodimentof the invention, requests for bins 317 with opposite measures for anestimate of the probability for one of the two possible bin values(opposite measure are those which represent probability estimates P and1−P) are forwarded to the same bin buffer 320. In a further embodimentof the invention, the association of the measure for an estimate of theprobability for one of the two possible bin values for the current binrequest with a particular bin buffer is adapted over time.

In a further embodiment of the invention, the bin buffer selector 318determines the bin buffer 320 to which the request for a bin 319 is sentbased on the associated measure for an estimate of the probability forthe less probable or more probable bin value for the current requestedbin. In an embodiment of the invention, the set of possible values forthe measure for an estimate of the probability for the less probable ormore probable bin value is finite and the bin buffer selector 318contains a table that associates exactly one bin buffer 320 with eachpossible value of the estimate of the probability for the less probableor more probable bin value, where different values for the measure foran estimate of the probability for the less probable or more probablebin value can be associated with the same bin buffer 320. In a furtherembodiment of the invention, the range of possible values for themeasure for an estimate of the probability for the less probable or moreprobable bin value is partitioned into a number of intervals, the binbuffer selector 318 determines the interval index for the currentmeasure for an estimate of the probability for the less probable or moreprobable bin value, and the bin buffer selector 318 contains a tablethat associates exactly one bin buffer 320 with each possible value forthe interval index, where different values for the interval index can beassociated with the same bin buffer 320. In a further embodiment of theinvention, the association of the measure for an estimate of theprobability for the less probable or more probable bin value for thecurrent bin request with a particular bin buffer is adapted over time.

After receiving a decoded bin 325 from the selected bin buffer 320, thebin buffer selector 318 potentially modifies the input bin 325 and sendsthe output bin 326—with a potentially modified value—to the binarizer314. The input/output bin mapping of the bin buffer selector 318 is theinverse of the input/output bin mapping of the bin buffer selector atthe encoder side.

In an embodiment of the invention, the bin buffer selector 318 does notmodify the value of the bin, i.e., the output bin 326 has the same valueas the input bin 325. In a further embodiment of the invention, the binbuffer selector 318 determines the output bin value 326 based on theinput bin value 325 and the measure for an estimate of the probabilityfor one of the two possible bin values for the current requested binthat is associated with the request for a bin 317. In an embodiment ofthe invention, the output bin value 326 is set equal to the input binvalue 325 if the measure for the probability for one of the two possiblebin values for the current bin request is less than (or less than orequal to) a particular threshold; if the measure for the probability forone of the two possible bin values for the current bin request isgreater than or equal to (or greater than) a particular threshold, theoutput bin value 326 is modified (i.e., it is set to the opposite of theinput bin value). In a further embodiment of the invention, the outputbin value 326 is set equal to the input bin value 325 if the measure forthe probability for one of the two possible bin values for the currentbin request is greater than (or greater than or equal to) a particularthreshold; if the measure for the probability for one of the twopossible bin values for the current bin request is less than or equal to(or less than) a particular threshold, the output bin value 326 ismodified (i.e., it is set to the opposite of the input bin value). In anembodiment of the invention, the value of the threshold corresponds to avalue of 0.5 for the estimated probability for both possible bin values.

In a further embodiment of the invention, the bin buffer selector 318determines the output bin value 326 based on the input bin value 325 andthe identifier, specifying an estimate for which of the two possible binvalues represents the less probable or more probable bin value for thecurrent bin request, that is associated with the request for a bin 317.In an embodiment of the invention, the output bin value 326 is set equalto the input bin value 325 if the identifier specifies that the first ofthe two possible bin values represents the less probable (or moreprobable) bin value for the current bin request, and the output binvalue 326 is modified (i.e., it is set to the opposite of the input binvalue) if identifier specifies that the second of the two possible binvalues represents the less probable (or more probable) bin value for thecurrent bin request.

As described above, the bin buffer selector sends a request for a bin319 to one of the two or more bin buffers 320. The bin buffers 20represent first-in-first-out buffers, which are fed with sequences ofdecoded bins 321 from the connected bin decoders 322. As response to arequest for a bin 319 that is sent to a bin buffer 320 from the binbuffer selector 318, the bin buffer 320 removes the bin of its contentthat was first fed into the bin buffer 320 and sends it to the binbuffer selector 318. Bins that are earlier sent to the bin buffer 320are earlier removed and sent to the bin buffer selector 318.

Each of the two or more bin buffers 320 is connected with exactly onebin decoder 322 and each bin decoder is only connected with one binbuffer 320. Each bin decoder 322 reads codewords 323, which representsequences of bits, from a separate partial bitstream 324. The bindecoder converts a codeword 323 into a sequence of bins 321 that is sentto the connected bin buffer 320. The overall decoding algorithm convertstwo or more partial bitstreams 324 into a number of decoded syntaxelements, where the number of partial bitstreams is equal to the numberof bin buffers and bin decoders and the decoding of syntax elements istriggered by requests for new syntax elements. In an embodiment of theinvention, a bin decoder 322 converts codewords 323 of a variable numberof bits into a sequence of a variable number of bins 321. One advantageof embodiments of the invention is that the decoding of bins from thetwo or more partial bitstreams can be done in parallel (e.g. fordifferent groups of probability measures), which reduces the processingtime for several implementations.

Another advantage of embodiments of the invention is that the bindecoding, which is done by the bin decoders 322, can be specificallydesigned for different sets of parameters 317. In particular, the binencoding and decoding can be optimized (in terms of coding efficiencyand/or complexity) for different groups of estimated probabilities. Onthe one hand side, this allows a reduction of the encoding/decodingcomplexity relative to state-of-the-art entropy coding algorithms withsimilar coding efficiency. On the other hand side, it allows animprovement of the coding efficiency relative to state-of-the-artentropy coding algorithms with similar encoding/decoding complexity. Inan embodiment of the invention, the bin decoders 322 implement differentdecoding algorithms (i.e. mapping of bin sequences onto codewords) fordifferent groups of measures for an estimate of the probability for oneof the two possible bin values 317 for the current bin request. In afurther embodiment of the invention, the bin decoders 322 implementdifferent decoding algorithms for different groups of measures for anestimate of the probability for the less probable or more probable binvalue for the current requested bin.

The bin decoders 322 do the inverse mapping of the corresponding binencoders at the encoder side.

In an embodiment of the invention, the bin decoders 322—or one or moreof the bin decoders—represent entropy decoders that directly mapcodewords 323 onto sequences of bins 321. Such mappings can beefficiently implemented and don't necessitate a complex arithmeticcoding engine. The mapping of codewords onto sequences of bins has to beunique. In an embodiment of the invention, the mapping of codewords 323onto sequences of bins 321 is bijective. In a further embodiment of theinvention, the bin decoders 310—or one or more of the bindecoders—represent entropy decoders that directly map variable-lengthcodewords 323 into variable-length sequences of bins 321. In anembodiment of the invention, the input codewords representredundancy-free codes such as general huffman codes or canonical huffmancodes. Two examples for the bijective mapping of redundancy-free codesto bin sequences are illustrated in Table 3.

In a further embodiment of the invention, the bin decoders 322—or one ormore of the bin decoders—represent entropy decoders that directly mapfixed-length codewords 323 onto variable-length sequences of bins 321.In a further embodiment of the invention, the bin decoders 322—or one ormore of the bin decoders—represent entropy decoders that directly mapvariable-length codewords 323 onto fixed-length sequences of bins 321.

Thus, FIGS. 7 and 8 showed an embodiment for an encoder for encoding asequence of symbols 3 and a decoder for reconstructing same. The encodercomprises an assigner 304 configured to assign a number of parameters305 to each symbol of the sequence of symbols. The assignment is basedon information contained within previous symbols of the sequence ofsymbols such as the category of the syntax element 1 to therepresentation—such as binarization—of which the current symbol belongsand which, according to the syntax structure of the syntax elements 1,is currently be expected which expectation, in turn, is deducible fromthe history of previous syntax elements 1 and symbols 3. Further, theencoder comprises a plurality of entropy encoders 10 each of which isconfigured to convert the symbols 3 forwarded to the respective entropyencoder into a respective bitstream 312, and a selector 306 configuredto forward each symbol 3 to a selected one of the plurality of entropyencoders 10, the selection depending on the number of parameters 305assigned to the respective symbol 3. The assignor 304 could be thoughtof as being integrated into selector 206 in order to yield a respectiveselector 502.

The decoder for reconstructing a sequence of symbols comprises aplurality of entropy decoders 322, each of which is configured toconvert a respective bitstream 323 into symbols 321; an assigner 316configured to assign a number of parameters 317 to each symbol 315 of asequence of symbols to be reconstructed based on information containedwithin previously reconstructed symbols of the sequence of symbols (see326 and 327 in FIG. 8); and a selector 318 configured to retrieve eachsymbol of the sequence of symbols to be reconstructed from a selectedone of the plurality of entropy decoders 322, the selection depending onthe number of parameters defined to the respective symbol. The assigner316 may be configured such that the number of parameters assigned toeach symbol comprises, or is, a measure for an estimate of a probabilityof distribution among the possible symbol values a respective symbol mayassume. Again, assignor 316 and selector 318 may be thought of asintegrated into one block, a selector 402. The sequence of symbols to bereconstructed may be of a binary alphabet and the assigner 316 may beconfigured such that the estimate of the probability distributionconsists of a measure for an estimate of a probability of a lessprobable or more probable bin value of the two possible bin values ofthe binary alphabet and an identifier specifying an estimate for whichof the two possible bin values represents the less probable or moreprobable bin value. The assigner 316 may further be configured tointernally assign a context to each symbol of the sequence of symbols315 to be reconstructed based on the information contained withinpreviously reconstructed symbols of the sequence of symbols to bereconstructed with each context having a respective probabilitydistribution estimate associated therewith, and to adapt the probabilitydistribution estimate for each context to an actual symbol statisticbased on symbol values of previously reconstructed symbols to which therespective context is assigned. The context may take into account aspatial relationship or neighborhood of positions to which the syntaxelements belong such as in video or picture coding, or even in tables incase of financial applications. Then, the measure for the estimate ofthe probability distribution for each symbol may be determined based onthe probability distribution estimate associated with the contextassigned to the respective symbol such as by quantizing, or using as anindex into a respective table, the probability distribution estimateassociated with the context assigned with the respective symbol (in thebelow embodiments indexed by a pipe index along with a refinement index)to one of a plurality of probability distribution estimaterepresentatives (clipping away the refinement index) in order to obtainthe measure for the estimate of the probability distribution (the pipeindex indexing the partial bitstream 312). The selector may beconfigured such that a bijective association is defined between theplurality of entropy encoders and the plurality of probabilitydistribution estimate representatives. The selector 18 may be configuredto change a quantization mapping from a range of the probabilitydistribution estimates to the plurality of probability distributionestimate representatives in a predetermined deterministic way dependingon previously reconstructed symbols of the sequence of symbols, overtime. That is, selector 318 may change the quantization step sizes, i.e.the intervals of probability distributions mapped onto the individualprobability indices bijectively associated with the individual entropydecoders. The plurality of entropy decoders 322, in turn, may beconfigured to adapt their way of converting symbols into bit streamsresponsive to a change in the quantization mapping. For example, eachentropy decoder 322 may be optimized for, i.e may have an optimalcompression rate for, a certain probability distribution estimate withinthe respective probability distribution estimate quantization interval,and may change its codeword/symbol sequence mapping so as to adapt theposition of this certain probability distribution estimate within therespective probability distribution estimate quantization interval upona change of the latter so as to be optimized. The selector may beconfigured to change the quantization mapping such that rates by whichthe symbols are retrieved from the plurality of entropy decoders, aremade less dispersed. As to the binarizer 314 it is noted that same me beleft away if the syntax elements are already binary. Further, dependingon the type of decoder 322, the existence of the buffers 320 is notnecessitated. Further, the buffers may be integrated within thedecoders.

Termination of Finite Syntax Element Sequences

In an embodiment of the invention, the encoding and decoding is done fora finite set of syntax elements. Often a certain quantity of data suchas a still image, a frame or field of a video sequence, a slice of animage, a slice of a frame or a field of a video sequence, or a set ofsuccessive audio samples, etc. is coded. For finite sets of syntaxelements, in general, the partial bitstreams that are created at theencoder side have to be terminated, i.e., it has to be ensured that allsyntax elements can be decoded from the transmitted or stored partialbitstreams. After the last bin is inserted into the corresponding binbuffer 308, the bin encoder 310 has to ensure that a complete codewordis written to the partial bitstream 312. If the bin encoder 310represents an entropy encoder that implements a direct mapping of binsequences onto codewords, the bin sequence that is stored in the binbuffer after writing the last bin to the bin buffer might not representa bin sequence that is associated with a codeword (i.e., it mightrepresent a prefix of two or more bin sequences that are associated withcodewords). In such a case, any of the codewords associated with a binsequence that contains the bin sequence in the bin buffer as prefix hasto be written to the partial bitstream (the bin buffer has to beflushed). This could be done by inserting bins with a particular or anarbitrary value into the bin buffer until a codeword is written. In anembodiment of the invention, the bin encoder selects one of thecodewords with minimum length (in addition to the property that theassociated bin sequence has to contain the bin sequence in the binbuffer as prefix). At the decoder side, the bin decoder 322 may decodemore bins than necessitated for the last codeword in a partialbitstream; these bins are not requested by the bin buffer selector 318and are discarded and ignored. The decoding of the finite set of symbolsis controlled by requests for decoded syntax elements; if no furthersyntax element is requested for a quantity of data, the decoding isterminated.

Transmission and Multiplexing of the Partial Bitstreams

The partial bitstreams 312 that are created by the encoder can betransmitted separately, or they can be multiplexed into a singlebitstream, or the codewords of the partial bitstreams can be interleavedin a single bitstream.

In an embodiment of the invention, each partial bitstream for a quantityof data is written to one data packet. The quantity of data can be anarbitrary set of syntax elements such as a still picture, a field orframe of a video sequence, a slice of a still picture, a slice of afield or frame of a video sequence, or a frame of audio samples, etc.

In another embodiment of the invention, two or more of the partialbitstreams for a quantity of data or all partial bitstreams for aquantity of data are multiplexed into one data packet. The structure ofa data packet that contains multiplexed partial bitstreams isillustrated in FIG. 9.

The data packet 400 consists of a header and one partition for the dataof each partial bitstream (for the considered quantity of data). Theheader 400 of the data packet contains indications for the partitioningof the (remainder of the) data packet into segments of bitstream data402. Beside the indications for the partitioning, the header may containadditional information. In an embodiment of the invention, theindications for the partitioning of the data packet are the locations ofthe beginning of the data segments in units of bits or bytes ormultiples of bits or multiples of bytes. In an embodiment of theinvention, the locations of the beginning of the data segments are codedas absolute values in the header of the data packet, either relative tothe beginning of the data packet or relative to the end of the header orrelative to the beginning of the previous data packet. In a furtherembodiment of the invention, the locations of the beginning of the datasegments are differentially coded, i.e., only the difference between theactual beginning of a data segment and a prediction for the beginning ofthe data segment is coded. The prediction can be derived based onalready known or transmitted information such as the overall size of thedata packet, the size of the header, the number of data segments in thedata packet, the location of the beginning of preceding data segments.In an embodiment of the invention, the location of the beginning of thefirst data packet is not coded, but inferred based on the size of thedata packet header. At the decoder side, the transmitted partitionindications are used for deriving the beginning of the data segments.The data segments are then used as partial bitstreams and the datacontained in the data segments are fed into the corresponding bindecoders in sequential order.

There are several alternatives for multiplexing the partial bitstreamsinto a data packet. One alternative, which can reduce the necessitatedside information, in particular for cases in which the sizes of thepartial bitstreams are very similar, is illustrated in FIG. 10. Thepayload of the data packet, i.e., the data packet 410 without its header411, is partitioned into segments 412 a predefined way. As an example,the data packet payload can be partitioned into segments of the samesize. Then each segment is associated with a partial bitstream or withthe first part of a partial bitstream 413. If a partial bitstream isgreater than the associated data segment, its remainder 414 is placedinto the unused space at the end of other data segments. This can bedone in a way that the remaining part of a bitstream is inserted inreverse order (starting from the end of the data segment), which reducesthe side information. The association of the remainders of the partialbitstreams to data segments and, when more than one remainder is addedto a data segment, the start point for one or more of the remaindershave to be signaled inside the bitstream, e.g. in the data packetheader.

Interleaving of Variable-Length Codewords

For some applications, the above described multiplexing of the partialbitstreams (for a quantity of syntax elements) in one data packet canhave the following disadvantages: On the one hand side, for small datapackets, the number of bits for the side information that isnecessitated for signaling the partitioning can become significantrelative to the actual data in the partial bitstreams, which finallyreduces the coding efficiency. On the other hand, the multiplexing maynot suitable for applications that necessitate a low delay (e.g. forvideo conferencing applications). With the described multiplexing, theencoder cannot start the transmission of a data packet before thepartial bitstreams have been completely created, since the locations ofthe beginning of the partitions are not known before. Furthermore, ingeneral, the decoder has to wait until it receives the beginning of thelast data segment before it can start the decoding of a data packet. Forapplications as video conferencing systems, these delays can add-up toan additional overall delay of the system of several video pictures (inparticular for bit rates that are close to the transmission bit rate andfor encoders/decoders that necessitate nearly the time interval betweentwo pictures for encoding/decoding a picture), which is critical forsuch applications. In order to overcome the disadvantages for certainapplications, the encoder of an embodiment of the invention can beconfigured in a way that the codewords that are generated by the two ormore bin encoders are interleaved into a single bitstream. The bitstreamwith the interleaved codewords can be directly send to the decoder (whenneglecting a small buffer delay, see below). At the decoder side, thetwo or more bin decoders read the codewords directly from the bitstreamin decoding order; the decoding can be started with the first receivedbit. In addition, no side information is necessitated for signaling themultiplexing (or interleaving) of the partial bitstreams. A further wayof reducing the decoder complexity can be achieved when the bin decoders322 don't read variable-length codewords from a global bit buffer, butinstead they read fixed-length sequences of bits from the global bitbuffer and add these fixed-length sequences of bits to a local bitbuffer, where each bin decoder 322 is connected with a separate localbit buffer. The variable-length codewords are then read from the localbit buffer. Hence, the parsing of variable-length codewords can be donein parallel, only the access of fixed-length sequences of bits has to bedone in a synchronized way, but such an access of fixed-length sequencesof bits is usually very fast, so that the overall decoding complexitycan be reduced for some architectures. The fixed number of bins that aresent to a particular local bit buffer can be different for differentlocal bit buffer and it can also vary over time, depending on certainparameters as events in the bin decoder, bin buffer, or bit buffer.However, the number of bits that are read by a particular access doesnot depend on the actual bits that are read during the particularaccess, which is the important difference to the reading ofvariable-length codewords. The reading of the fixed-length sequences ofbits is triggered by certain events in the bin buffers, bin decoders, orlocal bit buffers. As an example, it is possible to request the readingof a new fixed-length sequence of bits when the number of bits that arepresent in a connected bit buffer falls below a predefined threshold,where different threshold values can be used for different bit buffers.At the encoder, it has to be insured that the fixed-length sequences ofbins are inserted in the same order into the bitstream, in which theyare read from the bitstream at the decoder side. It is also possible tocombine this interleaving of fixed-length sequences with a low-delaycontrol similar to the ones explained above. In the following, anembodiment for the interleaving of fixed-length sequences of bits isdescribed. For further details regards the latter interleaving schemes,reference is made to WO2011/128268A1.

After having described embodiments according to which the evenpreviously coding is used for compressing video data, is described as aneven further embodiment for implementing embodiments of the presentinvention which renders the implementation especially effective in termsof a good trade-off between compression rate on the one hand and look-uptable and computation overhead on the other hand. In particular, thefollowing embodiments enable the use of computationally less complexvariable length codes in order to entropy-code the individuallybitstreams, and effectively cover portions of the probability estimate.In the embodiments described below, the symbols are of binary nature andthe VLC codes presented below effectively cover the probability estimaterepresented by, for example, R_(LPS), extending within [0;0.5].

In particular, the embodiments outlined below describe possibleimplementations for the individual entropy coders 310 and decoders 322in FIGS. 7 to 17, respectively. They are suitable for coding of bins,i.e. binary symbols, as they occur in image or video compressionapplications. Accordingly, these embodiments are also applicable toimage or video coding where such binary symbols are split-up into theone or more streams of bins 307 to be encoded and bitstreams 324 to bedecoded, respectively, where each such bin stream can be considered as arealization of a Bernoulli process. The embodiments described below useone or more of the below-explained various so-calledvariable-to-variable-codes (v2v-codes) to encode the bin streams. Av2v-code can be considered as two prefix-free codes with the same numberof code words. A primary, and a secondary prefix-free code. Each codeword of the primary prefix-free code is associated with one code word ofthe secondary prefix-free code. In accordance with the below-outlinedembodiments, at least some of the encoders 310 and decoders 322, operateas follows: To encode a particular sequence of bins 307, whenever a codeword of the primary prefix-free code is read from buffer 308, thecorresponding code-word of the secondary prefix-free code is written tothe bit stream 312. The same procedure is used to decode such a bitstream 324, but with primary and secondary prefix-free codeinterchanged. That is, to decode a bitstream 324, whenever a code wordof the secondary prefix-free code is read from the respective bit stream324, the corresponding code-word of the primary prefix-free code iswritten to buffer 320.

Advantageously, the codes described below do not necessitate look-uptables. The codes are implementable in form of finite state machines.The v2v-codes presented here, can be generated by simple constructionrules such that there is no need to store large tables for the codewords. Instead, a simple algorithm can be used to carry out encoding ordecoding. Three construction rules are described below where two of themcan be parameterized. They cover different or even disjoint portions ofthe afore-mentioned probability interval and are, accordingly,specifically advantageous if used together, such as all three codes inparallel (each for different ones of the en/decoders 11 and 22), or twoof them. With the construction rules described below, it is possible todesign a set of v2v-codes, such that for Bernoulli processes witharbitrary probability p, one of the codes performs well in terms ofexcess code length.

As stated above, the encoding and decoding of the streams 312 and 324respectively, can either be performed independently for each stream orin an interleaved manner. This, however, is not specific to thepresented classes of v2v-codes and therefore, only the encoding anddecoding of a particular codeword is described for each of the threeconstruction rules in the following. However, it is emphasized, that allof the above embodiments concerning the interleaving solutions are alsocombinable with the presently described codes or en- and decoders 310and 322, respectively.

Construction Rule 1: ‘Unary Bin Pipe’ Codes or En-/Decoders 310 and 322

Unary bin pipe codes (PIPE=probability interval partitioning entropy)are a special version of the so-called ‘bin pipe’ codes, i.e. codessuitable for coding of any of the individual bitstreams 12 and 24, eachtransferring data of a binary symbol statistics belonging to a certainprobability sub-interval of the afore-mentioned probability range[0;0.5]. The construction of bin pipe codes is described first. A binpipe code can be constructed from any prefix-free code with at leastthree code words. To form a v2v-code, it uses the prefix-free code asprimary and secondary code, but with two code words of the secondaryprefix-free code interchanged. This means that except for two codewords, the bins are written to the bit stream unchanged. With thistechnique, only one prefix-free code needs to be stored along with theinformation, which two code words are interchanged and thus, memoryconsumption is reduced. Note, that it only makes sense to interchangecode words of different length since otherwise, the bit stream wouldhave the same length as the bin stream (neglecting effects that canoccur at the end of the bin stream).

Due to this construction rule, an outstanding property of the bin pipecodes is, that if primary and secondary prefix-free code areinterchanged (while the mapping of the code words is retained), theresulting v2v-code is identical to the original v2v-code. Therefore, theencoding algorithm and decoding algorithm are identical for bin-pipecodes.

A unary bin pipe code is constructed from a special prefix-free code.This special prefix-free code is constructed as follows. First, aprefix-free code consisting of n unary code words is generated startingwith ‘01’, ‘001’, ‘0001’, . . . until n code words are produced. n isthe parameter for the unary bin pipe code. From the longest code word,the trailing 1 is removed. This corresponds to a truncated unary code(but without the code word ‘0’). Then, n−1 unary code words aregenerated starting with ‘10’, ‘110’, ‘1110’, . . . until n−1 code wordsare produced. From the longest of these code words, the trailing 0 isremoved. The union set of these two prefix-free codes are used as inputto generate the unary bin pipe code. The two code words that areinterchanged are the one only consisting of 0s and the one onlyconsisting of 1s.

Example for n=4:

Nr Primary Secondary 1 0000 111 2 0001 0001 3 001 001 4 01 01 5 10 10 6110 110 7 111 0000Construction Rule 2: ‘Unary to Rice’ Codes and Unary to RiceEn-/Decoders 10 and 22:

Unary to rice codes use a truncated unary code as primary code. I.e.unary code words are generated starting with ‘1’, ‘01’, ‘001’, . . .until 2^(n)+1 code words are generated and from the longest code word,the trailing 1 is removed. n is the parameter of the unary to rice code.The secondary prefix-free code is constructed from the code words of theprimary prefix-free code as follows. To the primary code word onlyconsisting of 0s, the code word ‘1’ is assigned. All other code wordsconsist of the concatenation of the code word ‘0’ with the n-bit binaryrepresentation of the number of 0s of the corresponding code word of theprimary prefix-free code.

Example for n=3:

Nr Primary Secondary 1 1 0000 2 01 0001 3 001 0010 4 0001 0011 5 000010100 6 000001 0101 7 0000001 0110 8 00000001 0111 9 00000000 1Note, that this is identical to mapping an infinite unary code to a ricecode with rice parameter 2^(n).Construction Rule 3: ‘Three Bin’ CodeThe three bin code is given as:

Nr Primary Secondary 1 000 0 2 001 100 3 010 101 4 100 110 5 110 11100 6101 11101 7 011 11110 8 111 11111

It has the property, that the primary code (symbol sequences) is offixed length (three bins) and the code words are sorted by ascendingnumbers of 1s.

An efficient implementation of three bin code is described next. Anencoder and decoder for the three bin code can be implemented withoutstoring tables in the following way.

In the encoder (any of 10), three bins are read from the bin stream(i.e. 7). If these three bins contain exactly one 1, the code word ‘1’is written to the bit stream followed by two bins consisting of thebinary representation of the position of the 1 (starting from right with00). If the three bins contain exactly one 0, the code word ‘111’ iswritten to the bit stream followed by two bins consisting of the binaryrepresentation of the position of the 0 (starting from the right with00). The remaining code words ‘000’ and ‘111’ are mapped to ‘0’ and‘11111’, respectively.

In the decoder (any of 22), one bin or bit is read from the respectivebitstream 24. If it equals ‘0’, the code word ‘000’ is decoded to thebin stream 21. If it equals ‘1’, two more bins are read from the bitstream 24. If these two bits do not equal ‘11’, they are interpreted asthe binary representation of a number and two 0s and one 1 is decoded tothe bit stream such that the position of the 1 is determined by thenumber. If the two bits equal ‘11’, two more bits are read andinterpreted as binary representation of a number. If this number issmaller than 3, two 1s and one 0 are decoded and the number determinesthe position of the 0. If it equals 3, ‘111’ is decoded to the binstream.

An efficient implementation of unary bin pipe codes is described next.An encoder and decoder for unary bin pipe codes can be efficientlyimplemented by using a counter. Due to the structure of bin pipe codes,encoding and decoding of bin pipe codes is easy to implement:

In the encoder (any of 10), if the first bin of a code word equals ‘0’,bins are processed until a ‘1’ occurs or until n 0s are read (includingthe first ‘0’ of the code word). If a ‘1’ occurred, the read bins arewritten to the bit stream unchanged. Otherwise (i.e. n 0s were read),n−1 1s are written to the bit stream. If the first bin of the code wordequals ‘1’, bins are processed until a ‘0’ occurs or until n−1 is areread (including the first ‘1’ of the code word). If a ‘0’ occurred, theread bins are written to the bit stream unchanged. Otherwise (i.e. n−1is were read), n 0s are written to the bit stream.

In the decoder (any of 322), the same algorithm is used as for theencoder, since this is the same for bin pipe codes as described above.

An efficient implementation of unary to rice codes is described next. Anencoder and decoder for unary to rice codes can be efficientlyimplemented by using a counter as will be described now.

In the encoder (any of 310), bins are read from the bin stream (i.e. 7)until a 1 occurs or until 2^(n) 0s are read. The number of 0s iscounted. If the counted number equals 2^(n), the code word ‘1’ iswritten to the bit stream. Otherwise, ‘0’ is written, followed by thebinary representation of the counted number, written with n bits.

In the decoder (any of 322), one bit is read. If it equals ‘1’, 2^(n) 0sare decoded to the bin string. If it equals ‘0’, n more bits are readand interpreted as binary representation of a number. This number of 0sis decoded to the bin stream, followed by a ‘1’.

In other words, the just-described embodiments describe an encoder forencoding a sequence of symbols 303, comprising an assigner 316configured to assign a number of parameters 305 to each symbol of thesequence of symbols based on information contained within previoussymbols of the sequence of symbols; a plurality of entropy encoders 310each of which is configured to convert the symbols 307 forwarded to therespective entropy encoder 310 into a respective bitstream 312; and aselector 6 configured to forward each symbol 303 to a selected one ofthe plurality of entropy encoders 10, the selection depending on thenumber of parameters 305 assigned to the respective symbol 303.According to the just-outlined embodiments, at least a first subset ofthe entropy encoders may be a variable length encoder configured to mapsymbol sequences of variable lengths within the stream of symbols 307 tocodewords of variable lengths to be inserted in bitsream 312,respectively, with each of the entropy coders 310 of the first subsetusing a bijective mapping rule according to which code words of aprimary prefix-free code with (2n−1)≥3 code words are mapped to codewords of a secondary prefix-free code which is identical to the primaryprefix code such that all but two of the code words of the primaryprefix-free code are mapped to identical code words of the secondaryprefix-free code while the two code words of the primary and secondaryprefix-free codes have different lengths and are mapped onto each otherin an interchanged manner, wherein the entropy encoders may usedifferent n so as to covers different portions of an interval of theabove-mentioned probability interval. The first prefix-free code may beconstructed such that the codewords of the first prefix-free code are(a,b)₂, (a,a,b)₃, (a, . . . , a, b)_(n), (a, . . . , a)_(n), (b,a)₂,(b,b,a)₃, . . . , (b, . . . b, a)_(n-1), (b, . . . , b)_(n-1), and thetwo codewords mapped onto each other in the interchanged manner are (a,. . . , a)_(n) and (b, . . . , b)_(n-1) with b≠a and a,bϵ{0,1}. However,alternatives are feasible.

In other words, each of a first subset of entropy encoders may beconfigured to, in converting the symbols forwarded to the respectiveentropy encoder into the respective bitstream, examine a first symbolforwarded to the respective entropy encoder, to determine as to whether(1) the first symbol equals aϵ{0,1}, in which case the respectiveentropy encoder is configured to examine the following symbols forwardedto the respective entropy encoder to determine as to whether (1.1) bwith b≠a and bϵ{0,1} occurs within the next n−1 symbols following thefirst symbol, in which case the respective entropy encoder is configuredto write a codeword to the respective bitstream, which equals the firstsymbol followed by the following symbols forwarded to the respectiveentropy encoder, up to the symbol b; (1.2) no b occurs within the nextn−1 symbols following the first symbol, in which case the respectiveentropy encoder is configured to write a codeword to the respectivebitstream, which equals (b, . . . , b)_(n-1); or (2) the first symbolequals b, in which case the respective entropy encoder is configured toexamine the following symbols forwarded to the respective entropyencoder to determine as to whether (2.1) a occurs within the next n−2symbols following the first symbol, in which case the respective entropyencoder is configured to write a codeword to the respective bitstream,which equals the first symbol followed by the following symbolsforwarded to the respective entropy encoder up to the symbol a; or (2.2)no a occurs within the next n−2 symbols following the first symbol, inwhich case the respective entropy encoder is configured to write acodeword to the respective bitstream, which equals (a, . . . , a)_(n).

Additionally or alternatively, a second subset of the entropy encoders10 may be a variable length encoder configured to map symbol sequencesof variable lengths to codewords of fixed lengths, respectively, witheach of the entropy coders of the second subset using a bijectivemapping rule according to which code words of a primary truncated unarycode with 2^(n)+1 code words of the type {(a), (ba), (bba), . . . , (b .. . ba), (bb . . . b)} with b≠a and a,bϵ{0,1} are mapped to code wordsof a secondary prefix-free code such that the codeword (bb . . . b) ofthe primary truncated unary code is mapped onto codeword (c) of thesecondary prefix-free code and all other codewords {(a), (ba), (bba), .. . , (b . . . ba)} of the primary truncated unary code are mapped ontocodewords having (d) with c≠d and c,dϵ{0,1} as a prefix and a n-bit wordas suffix, wherein the entropy encoders use different n. Each of thesecond subset of entropy encoders may be configured such that the n-bitword is an n-bit representation of the number of b's in the respectivecodeword of the primary truncated unary code. However, alternatives arefeasible.

Again, from the perspective of the mode of operation of the respectiveencoder 10, each of the second subset of entropy encoders may beconfigured to, in converting the symbols forwarded to the respectiveentropy encoder into the respective bitstream, count a number of b's ina sequence of symbols forwarded to the respective entropy encoder, untilan a occurs, or until the number of the sequence of symbols forwarded tothe respective entropy encoder reaches 2^(n) with all 2^(n) symbols ofthe sequence being b, and (1) if the number of b's equals 2^(n), write cwith cϵ{0,1} as codeword of a secondary prefix-free code to therespective bitstream, and (2) if the number of b's is lower than 2^(n),write a codeword of the secondary prefix-free code to the respectivebitstream, which has (d) with c≠d and dϵ{0,1} as prefix and a n-bit worddetermined depending on the number of b's as suffix.

Also additionally or alternatively, a predetermined one of the entropyencoders 10 may be a variable length encoder configured to map symbolsequences of fixed lengths to codewords of variable lengths,respectively, the predetermined entropy coder using a bijective mappingrule according to which 2³ code words of length 3 of a primary code aremapped to code words of a secondary prefix-free code such that thecodeword (aaa)₃ of the primary code with aϵ{0,1} is mapped onto codeword(c) with cϵ{0,1}, all three codewords of the primary code having exactlyone b with b≠a and bϵ{0,1} are mapped onto codewords having (d) with c≠dand dϵ{0,1} as a prefix and a respective first 2-bit word out of a firstset of 2-bit words as a suffix, all three codewords of the primary codehaving exactly one a are mapped onto codewords having (d) as a prefixand a concatenation of a first 2-bit word not being an element of thefirst set and a second 2-bit word out of a second set of 2-bit words, asa suffix, and wherein the codeword (bbb)₃ is mapped onto a codewordhaving (d) as a prefix and a concatenation of the first 2-bit word notbeing an element of the first set and a second 2-bit word not being anelement of the second set, as a suffix. The first 2-bit word of thecodewords of the primary code having exactly one b may be a 2-bitrepresentation of a position of the b in the respective codeword of theprimary code, and the second 2-bit word of the codewords of the primarycode having exactly one a may be a 2-bit representation of a position ofthe a in the respective codeword of the primary code. However,alternatives are feasible.

Again, the predetermined one of the entropy encoders may be configuredto, in converting the symbols forwarded to the predetermined entropyencoder into the respective bitstream, examine the symbols to thepredetermined entropy encoder in triplets as to whether (1) the tripletconsists of a's, in which case the predetermined entropy encoder isconfigured to write the codeword (c) to the respective bitstream, (2)the triplet exactly comprises one b, in which case the predeterminedentropy encoder is configured to write a codeword having (d) as a prefixand a 2-bit representation of a position of the b in the triplet as asuffix, to the respective bitstream; (3) the triplet exactly comprisesone a, in which case the predetermined entropy encoder is configured towrite a codeword having (d) as a prefix and a concatenation of the first2-bit word not being an element of the first set and a 2-bitrepresentation of a position of the a in the triplet as a suffix, to therespective bitstream; or (4) the triplet consists of b's, in which casethe predetermined entropy encoder is configured to write a codewordhaving (d) as a prefix and a concatenation of the first 2-bit word notbeing an element of the first set and the first 2-bit word not being anelement of the second set as a suffix, to the respective bitstream.

Regarding the decoding side, just-described embodiments disclose adecoder for reconstructing a sequence of symbols 326, comprising aplurality of entropy decoders 322, each of which is configured toconvert a respective bitstream 324 into symbols 321; an assigner 316configured to assign a number of parameters to each symbol 326 of asequence of symbols to be reconstructed based on information containedwithin previously reconstructed symbols of the sequence of symbols; anda selector 318 configured to retrieve each symbol 325 of the sequence ofsymbols to be reconstructed from a selected one of the plurality ofentropy decoders, the selection depending on the number of parametersdefined to the respective symbol. According to the just-describedembodiments at least a first subset of the entropy decoders 322 arevariable length decoders configured to map codewords of variable lengthsto symbol sequences of variable lengths, respectively, with each of theentropy decoders 22 of the first subset using a bijective mapping ruleaccording to which code words of a primary prefix-free code with(2n−1)≥3 code words are mapped to code words of a secondary prefix-freecode which is identical to the primary prefix code such that all but twoof the code words of the primary prefix-free code are mapped toidentical code words of the secondary prefix-free code while the twocode words of the primary and secondary prefix-free codes have differentlengths and are mapped onto each other in an interchanged manner,wherein the entropy encoders use different n. The first prefix-free codemay be constructed such that the codewords of the first prefix-free codeare (a,b)₂, (a,a,b)₃, (a, . . . , a, b)_(n), (a, . . . , a)_(n), (b,a)₂,(b,b,a)₃, (b, . . . , b, a)_(⋅n-1), (b, . . . , b)_(⋅n-1), and the twocodewords mapped onto each other in the interchanged manner may be (a, .. . , a)_(n), and (b, . . . , b)_(n-1) with b≠a and a,bϵ{0,1}. However,alternatives are feasible.

Each of the first subset of entropy encoders may be configured to, inconverting the respective bitstream into the symbols, examine a firstbit of the respective bitstream, to determine as to whether (1) thefirst bit equals a 0 {0,1}, in which case the respective entropy encoderis configured to examine the following bits of the respective bitstreamto determine as to whether (1.1) b with b≠a and b 0 {0,1} occurs withinthe next n−1 bits following the first bit, in which case the respectiveentropy decoder is configured to reconstruct a symbol sequence, whichequals the first bit followed by the following bits of the respectivebitstream, up to the bit b; or (1.2) no b occurs within the next n−1bits following the first bit, in which case the respective entropydecoder is configured to reconstruct a symbol sequence, which equals (b,. . . , b)_(n-1); or (2) the first bit equals b, in which case therespective entropy decoder is configured to examine the following bitsof the respective bitstream to determine as to whether (2.1) a occurswithin the next n−2 bits following the first bit, in which case therespective entropy decoder is configured to reconstruct a symbolsequence, which equals the first bit followed by the following bits ofthe respective bitstream up to the symbol a; or (2.2) no a occurs withinthe next n−2 bits following the first bit, in which case the respectiveentropy decoder is configured to reconstruct a symbol sequence, whichequals (a, . . . , a)_(n).

Additionally or alternatively, at least a second subset of the entropydecoders 322 may be a variable length decoder configured to mapcodewords of fixed lengths to symbol sequences of variable lengths,respectively, with each of the entropy decoders of the second subsetusing a bijective mapping rule according to which code words of asecondary prefix-free code are mapped onto code words of a primarytruncated unary code with 2^(n)+1 code words of the type {(a), (ba),(bba), . . . , (b . . . ba), (bb . . . b)} with b≠a and a,bϵ{0,1} suchthat codeword (c) of the secondary prefix-free code is mapped onto thecodeword (bb . . . b) of the primary truncated unary code and codewordshaving (d) with c≠d and c,dϵ{0,1} as a prefix and a n-bit word assuffix, are mapped to a respective one of the other codewords {(a),(ba), (bba), . . . , (b . . . ba)} of the primary truncated unary code,wherein the entropy decoders use different n. Each of the second subsetof entropy decoders may be configured such that the n-bit word is ann-bit representation of the number of b's in the respective codeword ofthe primary truncated unary code. However, alternatives are feasible.

Each of a second subset of entropy decoders may be a variable lengthdecoder configured to map codewords of fixed lengths to symbol sequencesof variable lengths, respectively, and configured to, in converting thebitstream of the respective entropy decoder into the symbols, examine afirst bit of the respective bitstream to determine as to whether (1)same equals c with cϵ{0,1}, in which case the respective entropy decoderis configured to reconstruct a symbol sequence which equals (bb . . .b)₂ ^(n) with bϵ{0,1}; or (2) same equals d with c≠d and c,dϵ{0,1}, inwhich case the respective entropy decoder is configured to determine an-bit word from n further bits of the respective bitstream, followingthe first bit, and reconstruct a symbol sequence therefrom which is ofthe type {(a), (ba), (bba), . . . , (b . . . ba), (bb . . . b)} with b≠aand bϵ{0,1} with the number of b's depending on the n-bit word.

Additionally or alternatively, a predetermined one of the entropydecoders 322 may be a variable length decoders configured to mapcodewords of variable lengths to symbol sequences of fixed lengths,respectively, the predetermined entropy decoder using a bijectivemapping rule according to which code words of a secondary prefix-freecode are mapped to 2³ code words of length 3 of a primary code such thatcodeword (c) with cϵ{0,1} is mapped to the codeword (aaa)₃ of theprimary code with aϵ{0,1}, codewords having (d) with c≠d and dϵ{0,1} asa prefix and a respective first 2-bit word out of a first set of three2-bit words as a suffix are mapped onto all three codewords of theprimary code having exactly one b with b≠a and bϵ{0,1}, codewords having(d) as a prefix and a concatenation of a first 2-bit word not being anelement of the first set and a second 2-bit word out of a second set ofthree 2-bit words, as a suffix are mapped onto all three codewords ofthe primary code having exactly one a, and a codeword having (d) as aprefix and a concatenation of the first 2-bit word not being an elementof the first set and a second 2-bit word not being an element of thesecond set, as a suffix is mapped onto the codeword (bbb)₃. The first2-bit word of the codewords of the primary code having exactly one b maybe a 2-bit representation of a position of the b in the respectivecodeword of the primary code, and the second 2-bit word of the codewordsof the primary code having exactly one a may be a 2-bit representationof a position of the a in the respective codeword of the primary code.However, alternatives are feasible.

The predetermined one of the entropy decoders may be a variable lengthdecoder configured to map codewords of variable lengths to symbolsequences of three symbols each, respectively, and configured to, inconverting the bitstream of the respective entropy decoder into thesymbols, examine the first bit of the respective bitstream to determineas to whether (1) the first bit of the respective bitstream equals cwith cϵ{0,1}, in which case the predetermined entropy decoder isconfigured to reconstruct a symbol sequence which equals (aaa)₃ with a 0{0,1}, or (2) the first bit of the respective bitstream equals d withc≠d and dϵ{0,1}, in which case the predetermined entropy decoder isconfigured to determine a first 2-bit word from 2 further bits of therespective bitstream, following the first bit, and examine the first2-bit word to determine as to whether (2.1) the first 2-bit word is noelement of a first set of three 2-bit words, in which case thepredetermined entropy decoder is configured to reconstruct a symbolsequence which has exactly one b with b≠a and b 0 {0,1}, with theposition of b in the respective symbol sequence depending on the first2-bit word, or (2.2) the first 2-bit word is element of the first set,in which case the predetermined entropy decoder is configured todetermine a second 2-bit word from 2 further bits of the respectivebitstream, following the two bits from which the first 2-bit word hasbeen determined, and examine the second 2-bit word to determine as towhether (3.1) the second 2-bit word is no element of a second set ofthree 2-bit words, in which case the predetermined entropy decoder isconfigured to reconstruct a symbol sequence which has exactly one a,with the position of a in the respective symbol sequence depending onthe second 2-bit word, or (3.2) the second 2-bit word is element of asecond set of three 2-bit words, in which case the predetermined entropydecoder is configured to reconstruct a symbol sequence which equals(bbb)₃.

Now, after having described the general concept of a video codingscheme, embodiments of the present invention are described with respectto the above embodiments. In other words, the embodiments outlined belowmay be implemented by use of the above schemes, and vice versa, theabove coding schemes may be implemented using and exploiting theembodiments outlined below.

In the above embodiments described with respect to FIGS. 7 to 9, theentropy encoder and decoders of FIGS. 1 to 6, were implemented inaccordance with an PIPE concept. One special embodiment used arithmeticsingle-probability state an/decoders 310 and 322. As will be describedbelow, in accordance with an alternative embodiment, entities 306-310and the corresponding entities 318 to 322 may be replaced by a commonentropy encoding engine. As an example, imagine an arithmetic encodingengine, which manages merely one common state R and L and encodes allsymbols into one common bitstream, thereby giving-up the advantageousaspects of the present PIPE concept regarding parallel processing, butavoiding the necessity of interleaving the partial bitstreams as furtherdiscussed below. In doing so, the number of probability states by whichthe context's probabilities are estimated by update (such as tablelook-up), may be higher than the number of probability states by whichthe probability interval sub-division is performed. That is, analogouslyto quantizing the probability interval width value before indexing intothe table Rtab, also the probability state index may be quantized. Theabove description for a possible implementation for the singleen/decoders 310 and 322 may, thus, be extended for an example of animplementation of the entropy en/decoders 318-322/306-310 ascontext-adaptive binary arithmetic en/decoding engines:

To be more precise, in accordance with an embodiment, the entropyencoder attached to the output of parameter assigner (which acts as acontext assigner, here) may operate in the following way:

0. The assigner 304 forwards the bin value along with the probabilityparameter. The probability is pState_current[bin].

1. Thus, the entropy encoding engine receives: 1) va1LPS, 2) the bin and3) the probability distribution estimate pState_current[bin].pState_current[bin] may have more states than the number ofdistinguishable probability state indices of Rtab. If so,pState_current[bin] may be quantized such as, for example, bydisregarding m LSBs with m being greater than or equal to 1 andadvantageously 2 or 3 so as to obtain an p_state, i.e the index which isthen used to access the table Rtab. The quantization may, however, beleft away, i.e. p_state may be pState_current[bin].

2. Then, a quantization of R is performed (As mentioned above: eitherone R (and corresponding L with one common bitstream) is used/managedfor all distinguishable values of p_state, or one R (and corresponding Lwith associated partial bitstream per R/L, pair) per distinguishablevalue of p_state which latter case would correspond to having one binencoder 310 per such value)

-   -   q_index=Qtab[R>>q] (or some other form of quantization)

3. Then, a determination of R_(LPS) and R is performed:

-   -   R_(LPS)=Rtab[p_state][q_index]; Rtab has stored therein        pre-calculated values for p[p_state] Q[q_index]    -   R=R−R_(LPS) [that is, R is preliminarily pre-updated as if “bin”        was MPS]

4. Calculation of the new partial interval:

-   -   if (bin=1−va1MPS) then    -   L        L+R    -   R        R_(LPS)

5. Renormalization of L and R, writing bits,

Analogously, the entropy decoder attached to the output of parameterassigner (which acts as a context assigner, here) may operate in thefollowing way:

0. The assigner 304 forwards the bin value along with the probabilityparameter. The probability is pState_current[bin].

1. Thus, the entropy decoding engine receives the request for a binalong with: 1) va1LPS, and 2) the probability distribution estimatepState_current[bin]. pState_current[bin] may have more states than thenumber of distinguishable probability state indices of Rtab. If so,pState_current[bin] may be quantized such as, for example, bydisregarding m LSBs with m being greater than or equal to 1 andadvantageously 2 or 3 so as to obtain an p_state, i.e the index which isthen used to access the table Rtab. The quantization may, however, beleft away, i.e. p_state may be pState_current[bin].

2. Then, a quantization of R is performed (As mentioned above: eitherone R (and corresponding V with one common bitstream) is used/managedfor all distinguishable values of p_state, or one R (and corresponding Vwith associated partial bitstream per R/L, pair) per distinguishablevalue of p_state which latter case would correspond to having one binencoder 310 per such value)

-   -   q_index=Qtab[R>>q] (or some other form of quantization)

3. Then, a determination of R_(LPS) and R is performed:

-   -   R_(LPS)=Rtab[p_state][q_index]; Rtab has stored therein        pre-calculated values for p[p_state] Q[q_index]    -   R=R−R_(LPS) [that is, R is preliminarily pre-updated as if “bin”        was MPS]

4. Determination of bin depending on the position of the partialinterval:

-   -   if (V³R) then    -   bin        1−va1MPS (bin is decoded as LPS; bin buffer selector 18 will        obtain the actual bin value by use of this bin information and        va1MPS)    -   V        V−R    -   R        R_(LPS)    -   else    -   bin        va1MPS (bin is decoded as MPS; the actual bin value is obtained        by use of this bin information and valMPS)

5. Renormalization of R, reading out one bit and updating V,

As described above, the assigner 4 assigns pState_current[bin] to eachbin. The association may be done based on a context selection. That is,assigner 4 may select a context using an context index ctxIdx which, inturn, has a respective pState_current associated therewith. Aprobability update may be performed each time, a probabilitypState_current[bin] has been applied to a current bin. An update of theprobability state pState_current[bin] is performed depending on thevalue of the coded bit:

  if (bit = 1 - valMPS) then  pState_current ← Next_State_LPS[pState_current]  if (pState_current = 0) then valMPS ← 1 - valMPS else pState_current ← Next_State_MPS [pState_current]

If more than one context is provided, the adaptation is donecontext-wise, i.e. pState_current[ctxIdx] is used for coding and thenupdated using the current bin value (encoded or decoded, respectively).

As will be outlined in more detail below, in accordance with embodimentsdescribed now, the encoder and decoder may optionally be implemented tooperate in different modes, namely Low complexity (LC), and Highefficiency (HE) mode. This is illustrated primarily regarding PIPEcoding in the following (then mentioning LC and HE PIPE modes), but thedescription of the complexity scalability details is easily transferableto other implementations of the entropy encoding/decoding engines suchas the embodiment of using one common context-adaptive arithmeticen/decoder.

In accordance with the embodiments outlined below, both entropy codingmodes may share

-   -   the same syntax and semantics (for the syntax element sequence        301 and 327, respectively)    -   the same binarization schemes for all syntax elements (as        currently specified for CABAC) (i.e. binarizers may operate        irrespective of the mode activated)    -   the usage of the same PIPE codes (i.e. bin en/decoders may        operate irrespective of the mode activated)    -   the usage of 8 bit probability model initialization values        (instead of 16 bit initialization values as currently specified        for CABAC)

Generally speaking, LC-PIPE differs from HE-PIPE in the processingcomplexity, such as the complexity of selecting the PIPE path 312 foreach bin.

For example, the LC mode may operate under the following constraints:For each bin (binIdx), there may be exactly one probability model, i.e.,one ctxIdx. That is, no context selection/adaptation may be provided inLC PIPE. Specific syntax elements such as those used for residual codingmay, hover, coded using contexts, as further outlined below. Moreover,all probability models may be non-adaptive, i.e., all models may beinitialized at the beginning of each slice with appropriate modelprobabilities (depending on the choice of slice type and slice QP) andmay be kept fixed throughout processing of the slice. For example, only8 different model probabilities corresponding to 8 different PIPE codes310/322 may be supported, both for context modelling and coding.Specific syntax elements for residual coding, i.e.,significance_coeff_flag and coeff_abs_level_greaterX (with X=1, 2), thesemantics of which are outlied in more detail below, may be assigned toprobability models such that (at least) groups of, for example, 4 syntaxelements are encoded/decoded with the same model probability. Comparedto CAVLC, the LC-PIPE mode achieves roughly the same R-D performance andthe same throughput.

HE-PIPE may be configured to be conceptually similar to CABAC of H.264with the following differences: Binary arithmetic coding (BAC) isreplaced by PIPE coding (same as in the LC-PIPE case). Each probabilitymodel, i.e., each ctxIdx, may be represented by a pipeIdx and arefineIdx, where pipeIdx with values in the range from 0 . . . 7represents the model probability of the 8 different PIPE codes. Thischange affects only the internal representation of states, not thebehavior of the state machine (i.e., probability estimation) itself. Aswill be outlined in more detail below, the initialization of probabilitymodels may use 8 bit initialization values as stated above. Backwardscanning of syntax elements coeff_abs_level_greaterX (with X=1, 2),coeff_abs_level_minus3, and coeff_sign_flag (the semantics of which willget clear from the below discussion) may be performed along the samescanning path as the forward scan (used in, for example, thesignificance map coding). Context derivation for coding ofcoeff_abs_level_greaterX (with X=1, 2) may also be simplified. Comparedto CABAC, the proposed HE-PIPE achieves roughly the same R-D performanceat a better throughput.

It is easy to see that the just-mentioned modes are readily generated byrendering, for example, the afore-mentioned context-adaptive binaryarithmetic en/decoding engine such that same operates in differentmodes.

Thus, in accordance with an embodiment in accordance with a first aspectof the present invention, a decoder for decoding a data stream may beconstructed as shown in FIG. 11. The decoder is for decoding adatastream 401, such as interleaved bitstream 340, into which mediadata, such as video data, is coded. The decoder comprises a mode switch400 configured to activate the low-complexity mode or the highefficiency mode depending on the data stream 401. To this end, the datastream 401 may comprise a syntax element such as a binary syntaxelement, having a binary value of 1 in case of the low-complexity modebeing the one to be activated, and having a binary value of 0 in case ofthe high efficiency mode being the one to be activated. Obviously, theassociation between binary value and coding mode could be switched, anda non-binary syntax element having more than two possible values couldbe used as well. As the actual selection between both modes is not yetclear before the reception of the respective syntax element, this syntaxelement may be contained within some leading header of the datastream401 encoded, for example, with a fixed probability estimate orprobability model or being written into the datastream 401 as it is,i.e., using a bypass mode.

Further, the decoder of FIG. 11 comprises a plurality of entropydecoders 322 each of which is configured to convert codewords in thedatastream 401 to partial sequences 321 of symbols. As described above,a de-interleaver 404 may be connected between inputs of entropy decoders322 on the one hand and the input of the decoder of FIG. 11 where thedatastream 401 is applied, on the other hand. Further, as alreadydescribed above, each of the entropy decoders 322 may be associated witha respective probability interval, the probability intervals of thevarious entropy decoders together covering the whole probabilityinterval from 0 to 1—or 0 to 0.5 in case of the entropy decoders 322dealing with MPS and LPS rather than absolute symbol values. Detailsregarding this issue have been described above. Later on, it is assumedthat the number of decoders 322 is 8 with a PIPE index being assigned toeach decoder, but any other number is also feasible. Further, one ofthese coders, in the following this is exemplarily the one havingpipe_id 0, is optimized for bins having equi-probable statistics, i.e.their bin value assumes 1 and 0 equally probably. This, decoder maymerely pass on the bins. The respective encoder 310 operates the same.Even any bin manipulation depending on the value of the most probablebin value, va1MPS, by the selectors 402 and 502, respectively, may beleft away. In other words, the entropy of the respective partial streamis already optimal.

Further, the decoder of FIG. 11 comprises a selector 402 configured toretrieve each symbol of a sequence 326 of symbols from a selected one ofthe plurality of entropy decoders 322. As mentioned above, selector 402may be split-up into a parameter assigner 316 and a selector 318. Ade-symbolizer 314 is configured to de-symbolize the sequence 326 ofsymbols in order to obtain a sequence 327 of syntax elements. Areconstructor 404 is configured to reconstruct the media data 405 basedon the sequence of syntax elements 327. The selector 402 is configuredto perform the selection depending on the activated one of the lowcomplexity mode and the high-efficiency mode as it is indicated by arrow406.

As already noted above, the reconstructor 404 may be the part of apredictive block-based video decoder operating on a fixed syntax andsemantics of syntax elements, i.e., fixed relative to the mode selectionby mode switch 400. That is, the construction of the reconstructor 404does not suffer from the mode switchability. To be more precise, thereconstructor 404 does not increase the implementation overhead due tothe mode switchability offered by mode switch 400 and at least thefunctionality with regard to the residual data and the prediction dataremains the same irrespective of the mode selected by switch 400. Thesame applies, however, with regard to the entropy decoders 322. Allthese decoders 322 are reused in both modes and, accordingly, there isno additional implementation overhead although the decoder of FIG. 11 iscompatible with both modes, the low-complexity and high-efficiencymodes.

As a side aspect it should be noted that the decoder of FIG. 11 is notonly able to operate on self-contained datastreams either in the onemode or the other mode. Rather, the decoder of FIG. 11 as well as thedatastream 401 could be configured such that switching between bothmodes would even be possible during one piece of media data such asduring a video or some audio piece, in order to, for example, controlthe coding complexity at the decoding side depending on external orenvironmental conditions such as a battery status or the like with usinga feedback channel from decoder to encoder in order to accordinglylocked-loop control the mode selection.

Thus, the decoder of FIG. 11 operates similarly in both cases, in caseof the LC mode being selected or the HE mode being selected. Thereconstructor 404 performs the reconstruction using the syntax elementsand requests the current syntax element of a predetermined syntaxelement type by processing or obeying some syntax structureprescription. The de-symbolizer 314 requests a number of bins in orderto yield a valid binarization for the syntax element requested by thereconstructor 404. Obviously, in case of a binary alphabet, thebinarization performed by de-symbolizer 314 reduces down to merelypassing the respective bin/symbol 326 to reconstructor 404 as the binarysyntax element currently requested.

The selector 402, however, acts independently on the mode selected bymode switch 400. The mode of operation of selector 402 tends to be morecomplex in case of the high efficiency mode, and less complex in case ofthe low-complexity mode. Moreover, the following discussion will showthat the mode of operation of selector 402 in the less-complex mode alsotends to reduce the rate at which selector 402 changes the selectionamong the entropy decoders 322 in retrieving the consecutive symbolsfrom the entropy decoders 322. In other words, in the low-complexitymode, there is an increased probability that immediately consecutivesymbols are retrieved from the same entropy decoder among the pluralityof entropy decoders 322. This, in turn, allows for a faster retrieval ofthe symbols from the entropy decoders 322. In the high-efficiency mode,in turn, the mode of operation of the selector 402 tends to lead to aselection among the entropy decoders 322 where the probability intervalassociated with the respective selected entropy decoder 322 more closelyfits to the actual symbol statistics of the symbol currently retrievedby selector 402, thereby yielding a better compression ratio at theencoding side when generating the respective data stream in accordancewith the high-efficiency mode.

For example, the different behavior of the selector 402 in both modes,may be realized as follows. For example, the selector 402 may beconfigured to perform, for a predetermined symbol, the selection amongthe plurality of entropy decoders 322 depending on previously retrievedsymbols of the sequence 326 of symbols in case of the high-efficiencymode being activated and independent from any previously retrievedsymbols of the sequence of symbols in case of the low-complexity modebeing activated. The dependency on previously retrieved symbols of thesequence 326 of symbols may result from a context adaptivity and/or aprobability adaptivity. Both adaptivities may be switched off during lowcomplexity mode in selector 402.

In accordance with a further embodiment, the datastream 401 may bestructured into consecutive portions such as slices, frames, group ofpictures, frame sequences or the like, and each symbol of the sequenceof symbols may be associated with a respective one of a plurality ofsymbol types. In this case, the selector 402 may be configured to vary,for symbols of a predetermined symbol type within a current portion, theselection depending on previously retrieved symbols of the sequence ofsymbols of the predetermined symbol type within the current portion incase of the high-efficiency mode being activated, and leave theselection constant within the current portion in case of thelow-complexity mode being activated. That is, selector 402 may beallowed to change the selection among the entropy decoders 322 for thepredetermined symbol type, but these changes are restricted to occurbetween transitions between consecutive portions. By this measure,evaluations of actual symbol statistics are restricted to seldomoccurring time instances while coding complexity is reduced within themajority of the time.

Further, each symbol of the sequence 326 of symbols may be associatedwith a respective one of a plurality of symbol types, and the selector402 may be configured to, for a predetermined symbol of a predeterminedsymbol type, select one of a plurality of contexts depending onpreviously retrieved symbols of the sequence 326 of symbols and performthe selection among the entropy decoders 322 depending on a probabilitymodel associated with a selected context along with updating theprobability model associated with a selected context depending on thepredetermined symbol in case of the high-efficiency mode beingactivated, and perform selecting the one of the plurality of contextdepending on the previously retrieved symbols of the sequence 326 ofsymbols and perform the selection among the entropy decoders 322depending on the probability model associated with the selected contextalong with leaving the probability model associated with the selectedcontext constant in case of the low-complexity mode being activated.That is, selector 402 may use context adaptivity with respect to acertain syntax element type in both modes, while suppressing probabilityadaptation in case of the LC mode.

Alternatively, instead of completely suppressing the probabilityadaptation, selector 402 may merely reduce an update rate of theprobability adaptation of the LC mode relative to the HE mode.

Further, possible LC-pipe-specific aspects, i.e., aspects of the LCmode, could be described as follows in other words. In particular,non-adaptive probability models could be used in the LC mode. Anon-adaptive probability model can either have a hardcoded, i.e.,overall constant probability or its probability is kept fixed throughoutprocessing of a slice only and thus can be set dependent on slice typeand QP, i.e., the quantization parameter which is, for example, signaledwithin the datastream 401 for each slice. By assuming that successivebins assigned to the same context follow a fixed probability model, itis possible to decode several of those bins in one step as they areencoded using the same pipe code, i.e., using the same entropy decoder,and a probability update after each decoded bin is omitted. Omittingprobability updates saves operations during the encoding and decodingprocess and, thus, also leads to complexity reductions and a significantsimplification in hardware design.

The non-adaptive constraint may be eased for all or some selectedprobability models in such a way that probability updates are allowedafter a certain number of bins have been encoded/decoded using thismodel. An appropriate update interval allows a probability adaptationwhile having the ability to decode several bins at once.

In the following, a more detailed description of possible common andcomplexity-scalable aspects of LC-pipe and HE-pipe is presented. Inparticular, in the following, aspects are described which may be usedfor LC-pipe mode and HE-pipe mode in the same way or in acomplexity-scalable manner. Complexity-scalable means that the LC-caseis derived from the HE-case by removing particular parts or by replacingthem with something less complex. However, before proceeding therewith,it should be mentioned that the embodiment of FIG. 11 is easilytransferable onto the above-mentioned context-adaptive binary arithmeticen/decoding embodiment: selector 402 and entropy decoders 322 wouldcondense into a context-adaptive binary arithmetic decoder which wouldreceive the datastream 401 directly and select the context for a bincurrently to be derived from the datastream. This is especially true forcontext adaptivity and/or probability adaptivity. Bothfunctionalities/adaptivities may be switched off, or designed morerelaxed, during low complexity mode.

For example, in implementing the embodiment of FIG. 11, the pipe entropycoding stage involving the entropy decoders 322 could use eightsystematic variable-to-variable-codes, i.e., each entropy decoder 322could be of a v2v type which has been described above. The PIPE codingconcept using systematic v2v-codes is simplified by restricting thenumber of v2v-codes. In case of a context-adaptive binary arithmeticdecoder, same could manage the same probability states for the differentcontexts and use same—or a quantoized version thereof—for theprobability sub-division. The mapping of CABAC or probability modelstates, i.e. the sates used for probability update, to PIPE ids orprobability indices for look-up into Rtab may be as depicted in Table A.

TABLE A Mapping of CABAC states to PIPE indices CABAC state PIPE index 00 1 2 3 1 4 5 6 7 8 9 10 2 11 12 13 14 15 3 16 17 18 19 20 21 22 4 21324 25 26 27 28 29 30 31 32 5 33 34 35 36 37 38 39 40 41 42 43 44 45 46 647 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 7

This modified coding scheme may be used as a basis for thecomplexity-scalable video coding approach. When performing probabilitymode adaptation, the selector 402 or context-adaptive binary arithmeticdecoder, respectively, would select the PIPE decoder 322, .i.e. derivethe pipe index, to be used, and the probability index into Rtab,respectively, based on the probability state index—here exemplarilyranging from 0 to 62-associated with the currently to be decodedsymbol—such as via a context—using the mapping shown in table A, andwould update this probability state index depending on the currentlydecoded symbol using, for example, specific table walk transition valuespointing to the next probability state index to be visited in case of anMPS and a LPS, respectively. In case of LC mode, the latter update couldbe left away. Even the mapping could be left away in case of globallyfixed probability models.

However, an arbitrary entropy coding setup could be used and thetechniques in this document can also be used with minor adaptations.

The above description of FIG. 11 rather generally referred to syntaxelements and syntax element types. In the following, a complexityconfigurable coding of transform coefficient levels is described.

For example, the reconstructor 404 may be configured to reconstruct atransform block 200 of transform coefficient levels 202 based on aportion of the sequence of syntax elements independent from thehigh-efficiency mode or the low-complexity mode being activated, theportion of the sequence 327 of syntax elements comprising, in anun-interleaved manner, significance map syntax elements defining asignificance map indicating positions of non-zero transform coefficientlevels within the transform block 200, and then (followed by) levelsyntax elements defining the non-zero transform coefficient levels. Inparticular, the following elements may be involved: end position syntaxelements (last-significant_pos_x, last_significant_pos_y) indicating aposition of a last non-zero transform coefficient level within thetransform block; first syntax elements (coeff_significant_flag) togetherdefining a significance map and indicating, for each position along aone-dimensional path (274) leading from a DC position to the position ofthe last non-zero transform coefficient level within the transform block(200), as to whether the transform coefficient level at the respectiveposition is non-zero or not; second syntax elements (coeff_abs_greater1)indicating, for each position of the one-dimensional path (274) where,according to the first binary syntax elements, a non-zero transformcoefficient level is positioned, as to whether the transform coefficientlevel at the respective position is greater than one; and third syntaxelements (coeff_abs_greater2, coeff_abs_minus3) revealing, for eachposition of the one-dimensional path where, according to the firstbinary syntax elements, a transform coefficient level greater than oneis positioned, an amount by which the respective transform coefficientlevel at the respective position exceeds one.

The order among the end position syntax elements, the first, the secondand the third syntax elements may be same for the high-efficiency modeand the low-complexity mode, and the selector 402 may be configured toperform the selection among the entropy decoders 322 for symbols fromwhich the de-symoblizer 314 obtains the end position syntax elements,first syntax elements, second syntax elements and/or the third syntaxelements, differently depending on the low-complexity mode or thehigh-efficiency mode being activated.

In particular, the selector 402 may be configured, for symbols of apredetermined symbol type among a subsequence of symbols from which thede-symbolizer 314 obtains the first syntax elements and second syntaxelements, to select for each symbol of the predetermined symbol type oneof a plurality of contexts depending on previously retrieved symbols ofthe predetermined symbol type among the subsequence of symbols andperform the selection depending on a probability model associated withthe selected context in case of the high-efficiency mode beingactivated, and perform the selection in a piece wise constant mannersuch that the selection is constant over consecutive continuous subpartsof the subsequence in case of the low-complexity mode be activated. Asdescribed above, the subparts may be measured in the number of positionsover which the respective subpart extends when measured along theone-dimensional path 274, or in the number of syntax elements of therespective type already coded with the current context. That is, thebinary syntax elements coeff_significant_flag_coeff_abs_greater1 andcoeff_abs_greater2, for example, are coded context adaptively withselecting the decoder 322 based on the probability model of the selectedcontext in HE mode. Probability adaptation is used as well. In LC mode,there are also different contexts which are used for each of the binarysyntax elements coeff_significant_flag, coeff_abs_greater1 andcoeff_abs_greater2. However, for each of these syntax elements, thecontext is kept static for the first portion along path 274 withchanging the context merely at a transition to the next, immediatelyfollowing portion along the path 274. For example, each portion maydefined to be 4, 8, 16 positions of block 200 long, independent from asto whether for the respective position the respective syntax element ispresent or not. For example, coeff_abs_greater1 and coeff_abs_greater2are merely present for significant positions, i.e. positions where—orfor which—coeff_significant_flag is 1. Alternatively, each portion maydefined to be 4, 8, 16 syntax elements long, independent from as towhether for the thus resulting respective portion extends over a highernumber of block positions. For example, coeff_abs_greater1 andcoeff_abs_greater2 are merely present for significant positions, andthus, portions of four syntax elements each may extend over more than 4block positions due to positions therebetween along path 274 for whichno such syntax element is transmitted such as no coeff_abs_greater1 andcoeff_abs_greater2 because the respective level at this position iszero.

The selector 402 may be configured to, for the symbols of thepredetermined symbol type among the subsequence of symbols from whichthe de-symbolizer obtains the first syntax elements and second syntaxelements, select for each symbol of the predetermined symbol type theone of a plurality of contexts depending on a number of previouslyretrieved symbols of the predetermined symbol type within thesubsequence of symbols, which have a predetermined symbol value andbelong to the same subpart, or a number of previously retrieved symbolsof the predetermined symbol type within the sequence of symbols, whichbelong to the same subpart. The first alternative has been true forcoeff_abs_greater1 and the secondary alternative has be true forcoeff_abs_greater2 in accordance with the above specific embodiments.

Further, the third syntax elements revealing, for each position of theone-dimensional path where, according to the first binary syntaxelements, a transform coefficient level greater than one is positioned,an amount by which the respective transform coefficient level at therespective position exceeds one, may comprise integer-valued syntaxelements, i.e. coeff_abs_minus3, and the desymbolizer 314 may beconfigured to use a mapping function controllable by a control parameterto map a domain of symbol sequence words to a co-domain of theinteger-valued syntax elements, and to set the control parameter perinteger-valued syntax element depending on integer-valued syntaxelements of previous third syntax elements if the high-efficiency modeis activated, and perform the setting in a piecewise constant mannersuch that the setting is constant over consecutive continuous subpartsof the subsequence in case of the low-complexity mode being activated,wherein the selector 402 may configured to select a predetermined one ofthe entropy decoders (322) for the symbols of symbol sequence wordsmapped onto the integer-valued syntax elements, which is associated witha equal probability distribution, in both the high-efficiency mode andthe low-complexity mode. That is, even the desymbolizer may operatedependent on the mode selected be switch 400 is illustrated by dottedline 407. Instead of a piecewise constant setting of the controlparameter, the desymbolizer 314 may keep the control parameter constantduring the current slice, for example, or constant globally in time.

Next, a complexity-scalable context modelling is described.

The evaluation of the same syntax element of the top and the leftneighbour for the derivation of the context model index is a commonapproach and is often used in the HE case, e.g. for the motion vectordifference syntax element. However, this evaluation necessitates morebuffer storage and disallows the direct coding of the syntax element.Also, to achieve higher coding performance, more available neighbourscan be evaluated.

In an embodiment, all context modelling stage evaluating syntax elementsof neighbor square or rectangle blocks or prediction units are fixed toone context model. This is equal to the disabling of the adaptivity inthe context model selection stage. For that embodiment, the contextmodel selection depending on the bin index of the bin string after abinarization is not modified compared to the current design for CABAC.In another embodiment, additional to the fixed context model for syntaxelements employ the evaluation of neighbors, also the context model forthe different bin index are fixed. Note that the description does notinclude the binarization and context model selection for the motionvector difference and the syntax elements related to the coding of thetransform coefficient levels.

In an embodiment, only the evaluation of the left neighbor is allowed.This leads to reduced buffer in the processing chain because the lastblock or coding unit line has not to be stored anymore. In a furtherembodiment, only neighbors lying in the same coding unit are evaluated.

In an embodiment, all available neighbors are evaluated. For example, inaddition to the top and the left neighbor, the top left, the top right,and the bottom left neighbor are evaluated in case of availability.

That is, the selector 402 of FIG. 11 may be configured to use, for apredetermined symbol relating to a predetermined block of the mediadata, previously retrieved symbols of the sequence of symbols relatingto a higher number of different neighboring blocks of the media data incase of the high-efficiency mode being activated in order to select oneof a plurality of contexts and perform the selection among the entropydecoders 322 depending on a probability model associated with theselected context. That is, the neighboring blocks may neighbor in timesand/or spatial domain. Spatially neighboring blocks are visible, forexample, in FIGS. 1 to 3. Then, selector 402 may be responsive to themode selection by mode switch 400 to perform a contact adaptation basedon previously retrieved symbols or syntax elements relating to a highernumber of neighboring blocks in case of the HE mode compared to the LCmode thereby reducing the storage overhead as just-described.

Next, a reduced-complexity coding of motion vector differences inaccordance with an embodiment is described.

In the H.264/AVC video codes standard, a motion vector associated with amacroblock is transmitted by signaling the difference (motion vectordifference—mvd) between the motion vector of the current macroblock andthe median motion vector predictor. When the CABAC is used as entropycoder, the mvd is coded as follows. The integer-valued mvd is split intoan absolute and the sign part. The absolute part is binarized using acombination of truncated unary and 3rd order Exp-Golomb, referred to asthe prefix and the suffix of the resulting bin string. The bins relatedto the truncated unary binarization is coded using context models, whilebins related to the Exp-Golomb binarization is coded in a bypass mode,i.e. with a fixed probability of 0.5 with CABAC. The unary binarizationworks as follows. Let the absolute interger-value of the mvd be n, thenthe resulting bin string consists of n times ‘1’ and one trailing ‘0’.As an example, let n=4, then the bin string is ‘11110’. In case oftruncated unary, a limit exists and if the value excesses this limit,the bin string consists of n+1 times ‘1’. For the case of mvd, the limitis equal to 9. That means if an absolute mvd is equal to or greater than9 is coded, resulting in 9 times ‘1’, the bin string consists of aprefix and a suffix with Exp-Golomb binarization. The context modellingfor the truncated unary part is done as follows. For the first bin ofthe bin string, the absolute mvd values from the top and the leftneighbour macroblocks are taken if available (if not available, thevalue is inferred to be 0). If the sum for the specific component(horizontal or vertical direction) is greater than 2, the second contextmodel is selected, if the absolute sum is greater than 32, the thirdcontext model is selected, otherwise (the absolute sum is smaller than3) the first context model is selected. Furthermore, the context modelsare different for each component. For the second bin of the bin string,the fourth context model is used and the fifth context model is employedfor the remaining bins of the unary part. When the absolute mvd is equalto or greater than 9, e.g. all bins of the truncated unary part areequal to ‘1’, the difference between the absolute mvd value and 9 iscoded in a bypass mode with 3rd order Exp-Golomb binarization. In thelast step, the sign of the mvd is coded in a bypass mode.

The latest coding technique for the mvd when using CABAC as entropycoder is specified in the current Test Model (HM) of the High EfficiencyVideo Coding (HEVC) project. In HEVC, the block sizes are variable andthe shape specified by a motion vector is referred to as prediction unit(PU). The PU size of the top and the left neighbor may have other shapesand sizes than the current PU. Therefore, whenever relevant, thedefinition of top and the left neighbor are referred now as top and leftneighbor of the top-left corner of the current PU. For the codingitself, only the derivation process for the first bin may be changed inaccordance with an embodiment. Instead of evaluating the absolute sum ofthe MV from the neighbors, each neighbor may be evaluated separately. Ifthe absolute MV of a neighbor is available and greater than 16, thecontext model index may be incremented resulting in the same number ofcontext models for the first bin, while the coding of the remainingabsolute MVD level and the sign is exactly the same as in H.264/AVC.

In the above outlined technique on coding of the mvd, up to 9 bins haveto be coded with a context model, while the remaining value of an mvdcan be coded in a low complexity bypass mode together with the signinformation. This present embodiment describes a technique to reduce thenumber of bins coded with context models resulting in increased numberof bypass and reduces the number of context models necessitated for thecoding of mvd. For that, the cut-off value is decreased from 9 to 1 or2. That means only the first bin specifying if the absolute mvd isgreater than zero is coded using context model or the first and thesecond bin specifying if the absolute mvd is greater than zero and oneis coded using context model, while the remaining value is coded in thebypass mode and/or using a VLC code. All bins resulting from thebinarization using the VLC code—not using the unary or truncated unarycode—are coded using a low complexity bypass mode. In case of PIPE, adirect insertion into and from the bitstream are possible. Moreover, adifferent definition of the top and the left neighbor to derive bettercontext model selection for the first bin, may be used, if ever.

In an embodiment, Exp-Golomb codes are used to binarize the remainingpart of the absolute MVD components. For that, the order of theExp-Golomb code is variable. The order of the Exp-Golomb code is derivedas follows. After the context model for the first bin, and therefore theindex of that context model, is derived and coded, the index is used asthe order for the Exp-Golomb binarization part. In this embodiment, thecontext model for the first bin is ranged from 1-3 resulting in theindex 0-2, which are used as the order of the Exp-Golomb code. Thisembodiment can be used for the HE case.

In an alternative to the above outlined technique of using two timesfive contexts in coding of the absolute MVD, in order to code the 9unary code binarization bins, 14 context models (7 for each component)could be used as well. For example, while the first and second bins ofthe unary part could be could be coded with four different contexts asdescribed before, a fifth context could be used for the third bin and asixth context could be used with respect to the forth bin, while thefifth to ninth bins are coded using a seventh context. Thus, in thiscase even 14 contexts would be necessitated, and merely the remainingvalue can be coded in a low complexity bypass mode. A technique toreduce the number of bins coded with context models resulting inincreased number of bypass and reduce the number of context modelsnecessitated for the coding of MVD, is to decrease the cut-off valuesuch as, for example, from 9 to 1 or 2. That means only the first binspecifying if the absolute MVD is greater than zero would be coded usinga context model or the first and the second bin specifying if theabsolute MVD is greater than zero and one would be coded using arespective context model, while the remaining value is coded with a VLCcode. All bins resulting from the binarization using the VLC code arecoded using a low complexity bypass mode. In case of PIPE, a directinsertion into and from the bitstream is possible. Furthermore, thepresented embodiment uses another definition of the top and the leftneighbor to derive better context model selection for the first bin. Inaddition to this, the context modeling is modified in a way so that thenumber of context models necessitated for the first or the first andsecond bin is decreased leading to a further memory reduction. Also, theevaluation of the neighbours such as the above neighbour can be disabledresulting in the saving of the line buffer/memory necessitated forstorage of mvd values of the neighbours. Finally, the coding order ofthe components may be split in a way allowing the coding of the prefixbins for both components (i.e. bins coded with context models) followedby the coding of bypass bins.

In an embodiment, Exp-Golomb codes are used to binarize the remainingpart of the absolute mvd components. For that, the order of theExp-Golomb code is variable. The order of the Exp-Golomb code may bederived as follows. After the context model for the first bin, andtherefore the index of that context model is derived, the index is usedas the order for the Exp-Golomb binarization. In this embodiment, thecontext model for the first bin is ranged from 1-3 resulting in theindex 0-2, which is used as the order of the Exp-Golomb code. Thisembodiment can be used for the HE case and the number of context modelsis reduced to 6. In order to reduce the number of context models againand therefore to save memory, the horizontal and the vertical componentsmay share the same context models in a further embodiment. In that case,only 3 context models are necessitated. Furthermore, only the leftneighbour may be taken into account for the evaluation in a furtherembodiment of the invention. In this embodiment, the threshold can beunmodified (e.g. only single threshold of 16 resulting in Exp-Golombparameter of 0 or 1 or single threshold of 32 resulting in Exp-Golombparameter of 0 or 2). This embodiment saves the line buffer necessitatedfor the storage of mvd. In another embodiment, the threshold is modifiedand is equal to 2 and 16. For that embodiment, in total 3 context modelsare necessitated for the coding of the mvd and the possible Exp-Golombparameter is ranged from 0-2. In a further embodiment, the threshold isequal to 16 and 32. Again, the described embodiment is suitable for theHE case.

In a further embodiment of the invention, the cut-off value is decreasedfrom 9 to 2. In this embodiment, the first bin and the second bin may becoded using context models. The context model selection for the firstbin can be done as in the state-of-the-art or modified in a waydescribed in the embodiment above. For the second bin, a separatecontext model is selected as in the state-of-the-art. In a furtherembodiment, the context model for the second bin is selected byevaluating the mvd of the left neighbour. For that case, the contextmodel index is the same as for the first bin, while the availablecontext models are different than those for the first bin. In total, 6context models are necessitated (note that the components sharing thecontext models). Again, the Exp-Golomb parameter may depend on theselected context model index of the first bin. In another embodiment ofthe invention, the Exp-Golomb parameter is depending on the contextmodel index of the second bin. The described embodiments of theinvention can be used for the HE case.

In a further embodiment of the invention, the context models for bothbins are fixed and not derived by evaluating either the left or theabove neighbours. For this embodiment, the total number of contextmodels is equal to 2. In a further embodiment of the invention, thefirst bin and the second bin shares the same context model. As a result,only one context model is necessitated for the coding of the mvd. Inboth embodiments of the invention, the Exp-Golomb parameter may be fixedand be equal to 1. The described embodiment of the invention aresuitable for both HE and LC configuration.

In another embodiment, the order of the Exp-Golomb part is derivedindependently from the context model index of the first bin. In thiscase, the absolute sum of the ordinary context model selection ofH.264/AVC is used to derive the order for the Exp-Golomb part. Thisembodiment can be used for the HE case.

In a further embodiment, the order of the Exp-Golomb codes is fixed andis set to 0. In another embodiment, the order of the Exp-Golomb codes isfixed and set to 1. In an embodiment, the order of the Exp-Golomb codesis fixed to 2. In a further embodiment, the order of the Exp-Golombcodes is fixed to 3. In a further embodiment, the order of theExp-Golomb codes is fixed according the shape and the size of thecurrent PU. The presented embodiments can be used for the LC case. Notethat the fixed order of the Exp-Golomb part are considered with reducednumber of bins coded with context models.

In an embodiment, the neighbors are defined as follows. For the abovePU, all PUs covers the current PU are taken into account and the PU withthe largest MV used. This is done also for the left neighbor. All PUscovers the current PU are evaluated and the PU with the largest MV isused. In another embodiment, the average absolute motion vector valuefrom all PUs cover the top and the left border the current PU is used toderive the first bin.

For the presented embodiments above, it is possible to change the codingorder as follows. The mvd have to be specified for the horizontal andvertical direction one after another (or vice versa). Thus, two binstrings have to be coded. In order to minimize the number of modeswitching for the entropy coding engine (i.e. the switch between thebypass and the regular mode), it is possible to code the bins coded withcontext models for both components in the first step followed by thebins coded in bypass mode in the second step. Note that this is areordering only.

Please note that the bins resulting from the unary or truncated unarybinarization can also be represented by an equivalent fixed lengthbinarization of one flag per bin index specifying whether the value isgreater than the current bin index. As an example, the cut-off value fortruncated unary binarization of mvd is set to 2 resulting in codewords0, 10, 11 for values 0, 1, 2. In the corresponding fixed lengthbinarization with one flag per bin index, one flag for bin index 0 (i.e.the first bin) specifies whether the absolute mvd value is greater than0 or not and one flag for the second bin with bin index 1 specifieswhether the absolute mvd value is greater than 1 or not. When the secondflag is only coded when the first flag is equal to 1, this results inthe same codewords 0, 10, 11.

Next, complexity-scalable representation of the internal state ofprobability models in accordance with an embodiment as described.

In the HE-PIPE setup, the internal state of a probability model isupdated after encoding a bin with it. The updated state is derived by astate transition table lookup using the old state and the value of thecoded bin. In the case of CABAC, a probability model can take 63different states where each state corresponds to a model probability inthe interval (0.0, 0.5). Each of these states is used to realize twomodel probabilities. In addition to the probability assigned to thestate, 1.0 minus the probability is also used and a flag called valMpsstores the information whether the probability or 1.0 minus theprobability is used. This leads to a total of 126 states. To use such aprobability model with the PIPE coding concept, each of the 126 statesneeds to be mapped to one of the available PIPE coders. In currentimplementations of PIPE coders, this is done by using a lookup-table. Anexample of such a mapping is depicted in Table A.

In the following, an embodiment is described how the internal state of aprobability model can be represented to avoid using a lookup table toconvert the internal state to a PIPE index. Solely some simple bitmasking operations are needed to extract the PIPE index from theinternal state variable of the probability model. This novelcomplexity-scalable representation of the internal state of aprobability model is designed in a two level manner. For applicationswhere low complexity operation is mandatory only the first level isused. It describes only the pipe index and the flag valMps that is usedto encode or decode the associated bins. In the case of the describedPIPE entropy coding scheme, the first level can be used to differentiatebetween 8 different model probabilities. Thus, the first level wouldneed 3 bit for the pipeIdx and one further bit for the valMps flag. Withthe second level each of the coarse probability ranges of the firstlevel is refined into several smaller intervals that support thepresentation of probabilities at higher resolutions. This more detailedpresentation enables the more exact operation of probability estimators.In general, it is suitable for coding applications that aim towards highRD-performances. As an example this complexity-scaled representation ofthe internal state of probability models with the usage of PIPE isillustrated as follows:

First Level Second Level b₇ b₆ b₅ b₄ b₃ b₂ b₁ b₀ MPS PIPE Idx (0-7)Refinement Idx (0-15)

The first and the second level are stored in a single 8 bit memory. 4bits are necessitated to store the first level—an index that defines thePIPE index with the value of the MPS on the most significant bit- andanother 4 bits are used to store the second level. To implement thebehaviour of the CABAC probability estimator, each PIPE index has aparticular number of allowed refinement indices depending on how manyCABAC states were mapped on the PIPE index. E.g. for the mapping inTable A, the number of CABAC states per PIPE index is depicted in TableB.

TABLE B Number of CABAC states per PIPE index for the example of TableA. PIPE idx 0 1 2 3 4 5 6 7 Number of 3 7 5 7 10 14 16 1 CABAC states

During the encoding or decoding process of a bin the PIPE index andvalMps can be accessed directly by employing simple bit mask or bitshift operations. Low complexity coding processes necessitate the 4 bitsof the first level only and high efficiency coding processes canadditionally utilize the 4 bits of the second level to perform theprobability model update of the CABAC probability estimator. Forcarrying out this update, a state transition lookup-table can bedesigned that does the same state transitions as the original table, butusing the complexity-scalable two-level representation of states. Theoriginal state transition table consists of two times 63 elements. Foreach input state, it contains two output states. When using thecomplexity-scalable representation, the size of the state transitiontable does not exceed two times 128 elements which is an acceptableincrease of table size. This increase depends on how many bits are usedto represent the refinement index and to exactly emulate the behavior ofthe CABAC probability estimator, four bits are needed. However, adifferent probability estimator could be used, that can operate on areduced set of CABAC states such that for each pipe index no more than 8states are allowed. Therefore memory consumption can be matched to thegiven complexity level of the coding process by adapting the number ofbits used to represent the refinement index. Compared to the internalstate of model probabilities with CABAC—where 64 probability stateindices exist—the usage of table lookups to map model probabilities to aspecific PIPE code is avoided and no further conversion is necessitated.

Next, a complexity-scalable context model updating in accordance with anembodiment is described.

For updating a context model, its probability state index may be updatedbased on one or more previously coded bins. In the HE-PIPE setup, thisupdate is done after encoding or decoding of each bin. Conversely, inthe LC-PIPE setup, this update may never be done.

However, it is possible to do an update of context models in acomplexity-scalable way. That is, the decision whether to update acontext model or not may be based on various aspects. E.g., a codersetup could do no updates for particular context models only like e.g.the context models of syntax element coeff_significant_flag, and doupdates for all other context models.

In other words, the selector 402 could be configured to, for symbols ofeach of a number of predetermined symbol types, perform the selectionamong the entropy decoders 322 depending on a respective probabilitymodel associated the respective predetermined symbol such that thenumber of predetermined symbol types is lower in the low complexity modethan compared to the high-efficiency mode

Furthermore, criteria for controlling whether to update a context modelor not could be, e.g. the size of a bitstream packet, the number of binsdecoded so far, or the update is done only after coding a particularfixed or variable number of bins for a context model.

With this scheme for deciding whether to update context models or not,complexity-scalable context model updating can be implemented. It allowsfor increasing or decreasing the portion of bins in a bitstream forwhich context model updates are done. The higher the number of contextmodel updates, the better is the coding efficiency and the higher thecomputational complexity. Thus, complexity-scalable context modelupdating can be achieved with the described scheme.

In an embodiment, the context model update is done for bins of allsyntax elements except the syntax elements coeff_significant_flag,coeff_abs_greater1, and coeff_abs_greater2.

In a further embodiment, the context model update is done for bins ofthe syntax elements coeff_significant_flag, coeff_abs_greater1, andcoeff_abs_greater2 only.

In a further embodiment, the context model update is done for allcontext models when encoding or decoding of a slice starts. After aparticular predefined number of transform blocks being processed,context model update is disabled for all context models until the end ofthe slice is reached.

For example, the selector 402 may be configured to, for symbols of apredetermined symbol type, perform the selection among the entropydecoders 322 depending on a probability model associated with thepredetermined symbol type along with or without updating the associatedprobability model, such that a length of a learning phase of thesequence of symbols over which the selection for the symbols of thepredetermined symbol type is performed along with the update, is shorterin the low complexity mode than compared to the high-efficiency mode.

A further embodiment is identical to the previously describedembodiment, but it uses the complexity-scalable representation of theinternal state of context models in a way, such that one table storesthe “first part” (valMps and pipeIdx) of all context models and a secondtable stores the “second part” (refineIdx) of all context models. At thepoint, where the context model updating is disabled for all contextmodels (as described in the previous embodiment), the table storing the“second part” is not needed any longer and can be discarded.

Next, context model updating for a sequence of bins in accordance withan embodiment is described.

In the LC-PIPE configuration, the bins of syntax elements of typecoeff_significant_flag, coeff_abs_greater1, and coeff_abs_greater2 aregrouped into subsets. For each subset, a single context model is used toencode its bins. In this case, a context model update may be done aftercoding of a fixed number of bins of this sequence. This is denotedmulti-bin update in the following. However, this update may differ fromthe update using only the last coded bin and the internal state of thecontext model. E.g., for each bin that was coded, one context modelupdate step is conducted.

In the following, examples are given for the encoding of an exemplarysubset consisting of 8 bins. The letter ‘b’ denotes the decoding of abin and the letter ‘u’ denotes the update of the context model. In theLC-PIPE case only the bin decoding is done without doing context modelupdates:

-   -   b b b b b b b b

In the HE-PIPE case, after decoding of each bin, a context model updateis done:

-   -   b u b u b u b u b u b u b u b u

In order to somewhat decrease the complexity, the context model updatemay be done after a sequence of bins (in this example after each 4 bins,the updates of these 4 bins are done):

-   -   b b b b u u u u b b b b u u u u

That is, the selector 402 may be configured to, for symbols of apredetermined symbol type, perform the selection among the entropydecoders 322 depending on a probability model associated with thepredetermined symbol type along with or without updating the associatedprobability model such that a frequency at which the selection for thesymbols of the predetermined symbol type is performed along with theupdate, is lower in the low complexity mode than compared to thehigh-efficiency mode.

In this case, after the decoding of 4 bins, 4 update steps follow basedon the 4 bins just-decoded. Note that these four update steps can beconducted in one single step by using a lookup special lookup-table.This lookup table stores for each possible combination of 4 bins andeach possible internal state of the context model the resulting newstate after the four conventional update steps.

In a certain mode, the multi-bin update is used for syntax elementcoeff_significant_flag. For bins of all other syntax elements, nocontext model update is used. The number of bins that are coded before amulti-bin update step is done is set to n. When the number of bins ofthe set is not divisible by n, 1 to n−1 bins remain at the end of thesubset after the last multi-bin update. For each of these bins, aconventional single-bin update is done after coding all of these bins.The number n may be any positive number greater than 1. Another modecould bes identical to the previous mode, except that multi-bin updateis done for arbitrary combinations of coeff_significant_flag,coeff_abs_greater1 and coeff_abs_greater2 (instead ofcoeff_significant_flag only). Thus, this mode would be more complex thanthe other. All other syntax elements (where multi-bin update is notused) could be divided into two disjoint subsets where for one of thesubsets, single bin update is used and for the other subset no contextmodel update is used. Any possible disjoint subsets are valid (includingthe empty subset).

In an alternative embodiment, the multi-bin update could be based on thelast m bins only that are coded immediately before the multi-bin updatestep. m may be any natural number smaller than n. Thus, decoding couldbe done like:

-   -   b b b b u u b b b b u u b b b b u u b b b b . . .    -   with n=4 and m=2.

That is, the selector 402 may be configured to, for symbols of apredetermined symbol type, perform the selection among the entropydecoders 322 depending on a probability model associated with thepredetermined symbol type, along with updating the associatedprobability model every n-th symbol of the predetermined type based on mmost recent symbols of the predetermined symbol type such that the ration/m is higher in the low complexity mode than compared to thehigh-efficiency mode.

In a further embodiment, for syntax element coeff_significant_flag, thecontext modeling scheme using a local template as described above forthe HE-PIPE configuration may be used to assign context models to binsof the syntax element. However, for these bins, no context model updateis used.

Further, the selector 402 may be configured to, for symbols of apredetermined symbol type, select one of a number of contexts dependingon a number of previously retrieved symbols of the sequence of symbolsand perform the selection among the entropy decoders 322 depending on aprobability model associated with the selected context, such that thenumber of contexts, and/or the number of previously retrieved symbols,is lower in the low complexity mode than compared to the high-efficiencymode.

Probability Model Initialization Using 8 Bit Initialization Values

This section describes the initialization process of thecomplexity-scalable internal state of probability models using aso-called 8 bit initialization value instead of two 8 bit values as isthe case in the state-of-the-art video coding standard H.265/AVC. Itconsists of two parts which are comparable to the initialization valuepairs used for probability models in CABAC of H.264/AVC. The two partsrepresent the two parameters of a linear equation to compute the initialstate of a probability model, representing a particular probability(e.g. in form of a PIPE index) from a QP:

-   -   The first part describes the slope and it exploits the        dependency of the internal state in respect to the quantization        parameter (QP) that is used during encoding or decoding.    -   The second part defines a PIPE index at a given QP as well as        the valMps.

Two different modes are available to initialize a probability modelusing the given initialization value. The first mode is denotedQP-independent initialization. It only uses the PIPE index and valMpsdefined in the second part of the initialization value for all QPs. Thisis identical to the case where the slope equals 0. The second mode isdenoted QP-dependent initialization and it additionally uses the slopeof the first part of the initialization value to alter the PIPE indexand to define the refinement index. The two parts of an 8 bitinitialization value is illustrated as follows:

First Part Second Part b₇ b₆ b₅ b₄ b₃ b₂ b₁ b₀ Slope Index PIPEProbability Index

It consists of two 4 bit parts. The first part contains an index thatpoints to 1 out of 16 different predefined slopes that are stored in anarray. The predefined slopes consist of 7 negative slopes (slope index0-6), one slope that equals zero (slope index 7) and 8 positive slopes(slope index 8-15). The slopes are depicted in Table C.

TABLE C Slope Index 0 1 2 3 4 5 6 7 Slope −239 −143 −85 −51 −31 −19 −110 Value Slope Index 8 9 10 11 12 13 14 15 Slope 11 19 31 51 85 143 239399 Value

All values are scaled by a factor of 256 to avoid the usage of floatingpoint operations. The second part is the PIPE index which embodies theascending probability of valMps=1 between the probability interval p=0and p=1. In other words, PIPE coder n has to operate at a higher modelprobability than PIPE coder n−1. For every probability model one PIPEprobability index is available and it identifies the PIPE coder whoseprobability interval contains the probability of p_(valMPs)=1 for QP=26.

TABLE D Mapping of the second part of the initialization value to PIPEcoders and valMps: PIPE Probability Index 0 1 2 3 4 5 6 7 PIPE Coder UR5UR4 UR3 UR2 TB BP2 BP3 EP MPS 0 0 0 0 0 0 0 0 PIPE Probability Index 8 910 11 12 13 14 15 PIPE Coder EP BP3 BP2 TB UR2 UR3 UR4 UR5 MPS 1 1 1 1 11 1 1 UR = unary-to-rice-code, TB = three-bin-code, BP = bin-pipe-code,EP = equal probability (uncoded)

The QP and the 8 bit initialization value are necessitated to calculatethe initialization of the internal state of the probability models bycomputing a simple linear equation in the form of y=m*(QP−QPref)+256*b.Note m defines the slope that is taken from Table C by using the slopeindex (the first part of the 8 bit initialization value) and b denotesthe PIPE coder at QPref=26 (the second part of the 8 bit initializationvalue: “PIPE Probability Index”). Then, va1MPS is 1 and the pipeIdxequals (y−2048)>>8 if y is greater than 2047. Otherwise, va1MPS is 0 andpipeIdx equals (2047−y)>>8. The refinement index equals (((y−2048) &255)*numStates)>>8 if va1MPS equals 1. Otherwise, the refinement indexequals (((2047−y) & 255)*numStates)>>8. In both cases, numStates equalsthe number of CABAC states of the pipeIdx as depicted in Table B.

The above scheme can not only be used in combination with PIPE coders,but also in connection with the above-mentioned CABAC schemes. In theabsence of PIPE, the number of CABAC states, i.e. the probability statesbetween which the state transition in the probability update isperformed (pState_current[bin]), per PIPE Idx (i.e. the respective mostsignificant bits of pState_current[bin]) is then only a set ofparameters which realizes, in fact, a piece-wise linear interpolation ofthe CABAC state depending on the QP. Furthermore, this piece-wise linearinterpolation can also virtually be disabled in the case where theparameter numStates uses the same value for all PIPE Idx. For example,setting numStates to 8 for all cases yields a total of 16*8 states andthe computation of the refinement index simplifies to ((y−2048) &255)>>5 for va1MPS equal 1 or ((2047−y)&255)>>5 for va1MPS equal 0. Forthis case, mapping the representation using va1MPS, PIPE idx, andrefinement idx back to the representation used by the original CABAC ofH.264/AVC is very simple. The CABAC state is given as (PIPE Idx3)+refinement Idx. This aspect is described further below with regard toFIG. 16.

Unless the slope of the 8 bit initialization value equals zero or unlessthe QP equals 26 it is necessitated to compute the internal state byemploying the linear equation with the QP of the encoding or decodingprocess. In the case of the slope equaling to zero or that the QP of thecurrent coding process equals 26 the second part of 8 bit initializationvalue can be used directly for initializing the internal state of aprobability model. Otherwise the decimal part of the resulting internalstate can be further exploited to determine a refinement index in highefficiency coding applications by linear interpolation between thelimits of the specific PIPE coder. In this embodiment the linearinterpolation is executed by simply multiplying the decimal part withthe total number of refinement indices available for the current PIPEcoder and mapping the result to the closest integer refinement index.

The process of initialization of the internal state of the probabilitymodels could be varied with regard to the number of PIPE probabilityindex states. In particular, the double occurrence of the equal probablemode using PIPE coder El, i.e. the use of two different PIPE indices todistinguish between MPS being 1 or 0, could be avoided as follows.Again, the process could be invoked during the start of parsing of theslice data, and the input of this process could an 8 bit initializationvalue as depicted in Table E, which would be, for example, transmittedwithin the bit stream for every context model to be initialized.

TABLE E Setup of the 8 bits of initValue for a probability model First 4bits Last 4 bits initValue bits b₇ b₆ b₅ b₄ b₃ b₂ b₁ b₀ VariableslopeIdx propIdx

The first 4 bits define a slope index and are retrieved by masking thebits b4-b7. For every slope index a slope (m) is specified and displayedin Table F.

TABLE F Values of variable m for slopeIdx slopeIdx 0 1 2 3 4 5 6 7 8 910 11 12 13 14 15 m −239 −143 −85 −51 −31 −19 −11 0 11 19 31 51 85 143239 399

Bits b0-b3, the last 4 bits of the 8 bit initialization value, identifythe probIdx and describe the probability at a predefined QP. probIdx 0indicates the highest probability for symbols with value 0 andrespectively, probIdx 14 indicates the highest probability for symbolswith value 1. Table G shows for each probIdx the corresponding pipeCoderand its valMps.

TABLE G Mapping of the last 4 bits part of the initialization value toPIPE coders and valMps: probIdx 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14pipeCoder UR5 UR4 UR3 UR2 TBC BP2 BP3 EP BP3 BP2 TBC UR2 UR3 UR4 UR5vaIMPs 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 UR = unary-to-rice-code, TB =three-bin-code, BP = bin-pipe-code, EP = equal probability (uncoded)

With both values the calculation of the internal state could be done byusing a linear equation like y=m*x+256*b, where m denotes the slope, xdenotes the QP of the current slice and b is derived from the probIdx asshown in the following description. All values in this process arescaled by a factor of 256 to avoid the usage of floating pointoperations. The output (y) of this process represents the internal stateof the probability model at the current QP and is stored in a 8 bitmemory. As shown in G the internal state consists of the valMPs, thepipeIdx and the refineIdx.

TABLE H Setup of the internal state of a probability model First 4 bitsLast 4 bits initValue bits b₇ b₆ b₅ b₄ b₃ b₂ b₁ b₀ Variable valMpspipeIdx refineIdx

The assignment of the refineIdx and pipeIdx is similar to the internalstate of the CABAC probability models (pStateCtx) and is presented in H.

TABLE I Assignement of pipeIdx, refineIdx and pStateCtx pipeIdx 0 1 2refineIdx 0 1 2 0 1 2 3 4 5 6 0 1 2 3 4 pStateCtx 0 1 2 3 4 5 6 7 8 9 1011 12 13 14 pipeIdx 3 4 refineIdx 0 1 2 3 4 5 6 0 1 2 3 4 5 6 7 8 9pStateCtx 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 pipeIdx 5refineIdx 0 1 2 3 4 5 6 7 8 9 10 11 12 13 pStateCtx 32 33 34 35 36 37 3839 40 41 42 43 44 45 pipeIdx 6 7 refineIdx 0 1 2 3 4 5 6 7 8 9 10 11 1213 14 15 0 pStateCtx 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

In an embodiment the probIdx is defined at QP26. Based on the 8 bitinitialization value the internal state (valMps, pipeIdx and refineIdx)of a probability model is processed as described in the followingpseudo-code:

n = (probIdx

 8) - m * 26 fullCtxState = max(0, min (3839, (m * max (0, min (51,SliceQP_(y)) ) ) ) + n + 128) remCtxState = fullCtxState & 255preCtxState = fullCtxState

 8 if (preCtxState < 8 ) { pipeIdx = 7 - preCtxState valMPS = 0 } else {pipeIdx = preCtxState - 8 valMPS = 1 } offset = { 3, 7, 5, 7, 10, 14,16, 1 } if (pipeldx = = 0 ) { if (remCtxState <= 127) remCtxState =127 - remCtxState else remCtxState = remCtxState - 128 refineIdx = ((remCtxState

 1) * offset )

 8 } else { if (valMPS = = 0 ) remCtxState = 255 - remCtxState refineIdx= (remCtxState * offset[pipeIdx] )

 8 }

As shown in the pseudo code the refineIdx is calculated by linearlyinterpolating between the interval of the pipeIdx and quantizing theresult to the corresponding refineIdx. The offset specifies the totalnumber of refineIdx for each pipeIdx. The interval [7, 8) offullCtxState/256 is divided in half The interval [7, 7.5) is mapped topipeIdx=0 and valMps=0 and the interval [7.5, 8) is mapped to pipeIdx=0and valMps=1. FIG. 16 depicts the process of deriving the internal stateand displays the mapping of fullCtxState/256 to pStateCtx.

Note the slope indicates the dependency of the probIdx and the QP. Ifthe slopeIdx of the 8 bit initialization value equals 7 the resultinginternal state of the probability model is the same for all sliceQPs—hence the initialization process of the internal state isindependent from the current QP of the slice.

That is, selector 402 may initialize the pipe indices to be used indecoding the following portion of the datastream such as the wholestream or the next slice, using the syntax element indicating thequantization step size QP used in order to quantize the data of thisportion, such as the transform coefficient levels contained thereinusing this syntax element as an index into a table which may be commonfor both modes, LC and HE. The table such as table D may comprise pipeindices for each symbol type, for a respective reference QPref, or otherdata for each symbol type. Depending on the actual QP of the currentportion, the selector may compute a pipe index value using therespective table entry a indexed by the actual QP and QP itself, such asby multiplication a with (QP-QPref). The only difference in LC and HEmode: The selector computes the result merely at a lower accuracy incase of LC compared to HE mode. The selector may, for example, merelyuse the integer part of the computation result. In HE mode, the higheraccuracy remainder, such as the fractional part, is used to select oneof available refinement indices for the respective pipe index asindicated by the lower accuracy or integer part. The refinement index isused in HE mode (in portentially more seldomly also in LC mode) in orderto perform the probability adaptation such as by using theabove-mentioned table walk. When leaving the available indices for thecurrent pipe index at the higher bound, then the higher pipe index isselected next with minimizing the refinement index. When leaving theavailable indices for the current pipe index at the lower bound, thenthe next lower pipe index is selected next with maximizing therefinement index to the maximum available for the new pipe index. Thepipe indec along with the refinement index define the probability state,but for the selection among the partial streams, the selector merelyuses the pipe index. The refinement index merely serves for tracking theprobability more closely, or in a finer accuracy.

The above discussion also showed, however, that a complexity scalabilitymay be achieved independent from the PIPE coding concept of FIG. 7-10 orCABAC, using a decoder as shown in FIG. 12. The Decoder of FIG. 12 isfor decoding a data stream 601 into which media data is coded, andcomprises a mode switch 600 configured to activate a low-complexity modeor a high efficiency mode depending on the data stream 601, as well as adesymbolizer 602 configured to desymbolize a sequence 603 of symbolsobtained—either directly or by entropy decoding, for example—from thedata stream 601 to obtain integer-valued syntax elements 604 using amapping function controllable by a control parameter, for mapping adomain of symbol sequence words to a co-domain of the integer-valuedsyntax elements. A reconstructor 605 is configured to reconstruct themedia data 606 based on the integer-valued syntax elements. Thedesymbolizer 602 is configured to perform the desymbolization such thatthe control parameter varies in accordance with the data stream at afirst rate in case of the high-efficiency mode being activated and thecontrol parameter is constant irrespective of the data stream or changesdepending on the data stream, but at a second rate lower than the firstrate in case of the low-complexity mode being activated as it isillustrated by arrow 607. For example, the control parameter may vary inaccordance with previously desymbolized symbols.

Some of the above embodiments made use of the aspect of FIG. 12. Thesyntax elements coeff_abs_minus3 and MVD within sequence 327 were, forexample, binarized in desymbolizer 314 depending on the mode selected asindicated by 407, and the reconstructor 605 used these syntax elementsfor reconstruction. Obviously, both aspects of FIGS. 11 and 19 arereadily combinable, but the aspect of FIG. 12 may also be combined withother coding environments.

See, for example, the motion vector difference coding denoted above. Thedesymbolizer 602 may be configured such that the mapping function uses atruncated unary code to perform the mapping within a first interval ofthe domain of integer-valued syntax elements below a cutoff value and acombination of a prefix in form of the truncated unary code for thecutoff value and a suffix in form of a VLC codeword within a secondinterval of the domain of integer-valued syntax elements inclusive andabove the cutoff value, wherein the decoder may comprise an entropydecoder 608 configured to derive a number of first bins of the truncatedunary code from the data stream 601 using entropy decoding with varyingprobability estimation and a number of second bins of the VLC codewordusing a constant equi-probability bypass mode. In HE mode, the entropycoding may be more complex than in LC coding as illustrated by arrow609. That is, context-adaptivity and/or probability adaptation may beapplied in HE mode and suppressed in LC mode, or the complexity may bescaled in other terms, as set out above with respect to the variousembodiments.

An encoder fitting to decoder of FIG. 11, for encoding media data into adata stream is shown in FIG. 13. It may comprise an inserter 500configured to signal within the data stream 501 an activation of alow-complexity mode or a high efficiency mode, a constructor 504configured to precode the media data 505 into a sequence 506 of syntaxelements, a symbolizer 507 configured to symbolize the sequence 506 ofsyntax elements into a sequence 508 of symbols, a plurality of entropyencoders 310 each of which is configured to convert partial sequences ofsymbols into codewords of the data stream, and a selector 502 configuredto forward each symbol of the sequence 508 of symbols to a selected oneof the plurality of entropy encoders 310, wherein the selector 502 isconfigured to perform the selection depending on the activated one ofthe low complexity mode and the high-efficiency mode as illustrated byarrow 511. An interleaver 510 may be optionally provided forinterleaving the codewords of the encoders 310.

An encoder fitting to decoder of FIG. 12, for encoding media data into adata stream is shown in FIG. 14 as comprising an inserter 700 configuredto signal within the data stream 701 an activation of a low-complexitymode or a high efficiency mode, a constructor 704 configured to precodethe media data 705 into a sequence 706 of syntax elements comprising aninteger-valued syntax element, and a symbolizer 707 configured tosymbolize the integer-valued syntax element using a mapping functioncontrollable by a control parameter, for mapping a domain ofinteger-valued syntax elements to a co-domain of the symbol sequencewords, wherein the symbolizer 707 is configured to perform thesymbolization such that the control parameter varies in accordance withthe data stream at a first rate in case of the high-efficiency modebeing activated and the control parameter is constant irrespective ofthe data stream or changes depending on the data stream, but at a secondrate lower than the first rate in case of the low-complexity mode beingactivated as illustrated by arrow 708. The symbolization result is codedinto the datastream 701.

Again, it should be mentioned that the embodiment of FIG. 14 is easilytransferable onto the above-mentioned context-adaptive binary arithmeticen/decoding embodiment: selector 509 and entropy encoders 310 wouldcondense into a context-adaptive binary arithmetic encoder which wouldoutput the datastream 401 directly and select the context for a bincurrently to be derived from the datastream. This is especially true forcontext adaptivity and/or probability adaptivity. Bothfunctionalities/adaptivities may be switched off, or designed morerelaxed, during low complexity mode.

It has briefly been noted above that the mode switching abilityexplained with respect to some of the above embodiments may, inaccordance with alternative embodiments, be left away. To make thisclear, reference is made to FIG. 16, which summarizes the abovedescription insofar as merely the removal of the mode switching abilitydifferentiates the embodiment of FIG. 16 from the above embodiments.Moreover, the following description will reveal the advantages resultingfrom initializing the probability estimates of the contexts using lessaccurate parameters for slope and offset compared to, for example,H.264.

In particular, FIG. 16 shows a decoder for decoding a video 405 from adata stream 401 to which horizontal and vertical components of motionvector differences are coded using binarizations of the horizontal andvertical components, the binarizations equaling a truncated unary codeof the horizontal and vertical components, respectively, within a firstinterval of the domain of the horizontal and vertical components below acutoff value, and a combination of a prefix in form of the truncatedunary code. The cutoff value and a suffix in form of an exponentialGolomb code of the horizontal and vertical components, respectively,within a second interval of the domain of the horizontal and verticalcomponents inclusive and above the cutoff value, wherein the cutoffvalue is 2 and the exponential Golomb code has an order of 1. Thedecoder comprises an entropy decoder 409 configured to, for thehorizontal and vertical components of the motion vector differences,derive the truncated unary code from the data stream usingcontext-adaptive binary entropy decoding with exactly one context perbin position of the truncated unary code, which is common for thehorizontal and vertical components of the motion vector differences, andthe exponential Golomb code using a constant equi-probability bypassmode to obtain the binarizations of the motion vector differences. To bemore precise, as described above the entropy decoder 409 may beconfigured to derive the number of bins 326 of the binarizations fromthe data stream 401 using binary entropy decoding such as theabove-mentioned CABAC scheme, or binary PIPE decoding, i.e. using theconstruction involving several parallel operating entropy decoders 322along with a respective selector/assignerA desymbolizer 314 debinarizesthe binarizations of the motion vector difference syntax elements toobtain integer values of the horizontal and vertical components of themotion vector differences, and a reconstructor 404 reconstructs thevideo based on the integer values of the horizontal and verticalcomponents of the motion vector differences.

In order to explain this in more detail, reference is briefly made toFIG. 18. 800 representatively shows one motion vector difference, i.e. avector representing a prediction residual between a predicted motionvector and an actual/reconstructed motion vector. The horizontal andvertical components 802 x and 802 y are also illustrated. They might betransmitted in units of pixel positions, i.e. pixel pitch, or sub-pelpositions such as the half of the pixel pitch or a fourth thereof or thelike. The horizontal and vertical components 802 _(x,y) are integervalued. Their domain reaches from zero to infinity. The sign value maybe handled separately and is not considered here further. In otherwords, the description outlined herein focuses on the magnitude of themotion vector differences 802 x, y. The domain is illustrated at 804. Onthe right-hand side of the domain axis 804, FIG. 19 illustrates,associated with the possible values of component 802 x,y verticallyarranged upon each other, the binarizations onto which the respectivepossible value is mapped (binarized). As can be seen, below the cutoffvalue of 2, merely the truncated unary code 806 occurs, whereas thebinarization has, as a suffix, also the exponential Golomb code of order808 from possible values equal to or greater than the cutoff value of 2on in order to continue the binarization for the reminder of the integervalue above cutoff value minus 1. For all the bins, merely two contextsare provided: one for the first bin position of binarizations ofhorizontal and vertical components 802 x,y, and a further one for thesecond bin position of the truncated unary code 806 of both horizontaland vertical components 802 x,y. For the bin position of the exponentialGolomb code 808, the equi-probability bypass mode is used by the entropydecoder 409. That is, both bin values are assumed to occur equallyprobable. The probability estimation for these bins is fixed. Comparedthereto, the probability estimation associated with the just-mentionedtwo contexts of the bins of the truncated unary code 806 is adaptedcontinuously during decoding.

Before describing in more detail, as to how the entropy decoder 409could, in accordance with the above description, be implemented in orderto perform the just-mentioned tasks, the description now focuses on apossible implementation of the reconstructor 404 which uses the motionvector differences 800 and the integer values thereof as obtained by thedesymbolizor 314 by re-binarizing the bins of codes 106 and 108 with there-binarization being illustrated in FIG. 18 using arrow 810. Inparticular, the reconstructor 404 may, as described above, retrieve fromthe data stream 401 information concerning a subdivision of a currentlyreconstructed picture into blocks among which at least some are subjectto motion-compensated prediction. FIG. 19 shows a picture to bereconstructed representatively at 820 and blocks of the just-mentionedsubdivision of picture 120 for which motion-compensated prediction isused to predict the picture content therein at 822. As described withrespect to FIGS. 2A-2C, there are different possibilities for thesubdivision and the sizes of the blocks 122. In order to avoid atransmission for a motion vector difference 800 for each of these blocks122, reconstructor 404 may exploit a merge concept according to whichthe data stream additionally transmits merge information in addition tothe subdivision information or, in the absence of subdivisioninformation, in addition to the fact that the subdivision is fixed. Themerge information signals to reconstructor 404 as to which of blocks 822form a merge groups. By this measure, it is possible for reconstructor404 to apply a certain motion vector difference 800 to a whole mergegroup of blocks 822. Naturally, at the encoding side, the transmissionof the merge information is subject to a tradeoff between subdivisiontransmission overhead (if present), the merge information transmissionoverhead and the motion vector difference transmission overhead whichdecreases with increasing size of the merge groups. On the other hand,increasing the number of blocks per merge group reduces the adaptationof the motion vector difference for this merge group to the actual needsof the individual blocks of the respective merge group thereby yieldingless accurate motion-compensated predictions of the motion vectordifferences of these blocks and necessitating a higher transmissionoverhead for transmitting the prediction residual in form of, forexample, transform coefficient level. Accordingly, a tradeoff is foundon the encoding side in an appropriate manner. In any case, however, themerge concept results in the motion vector differences for the mergegroups showing less spatial inter-correlation. See, for example, FIG. 19which illustrates by shading a membership to a certain merge group.Obviously, the actual motion of the picture content in these blocks hasbeen so similar that the encoding side decided to merge the respectiveblocks. The correlation with the motion of the picture content in othermerge groups, however, is low. Accordingly, the restriction to usemerely one context per bin of the truncated unary code 806 does notnegatively impact the entropy coding efficiency as the merge conceptalready accommodates for the spatial inter-correlation betweenneighboring picture content motion sufficiently. The context may merelybe selected based on the fact that the bin is part of the binarizationof a motion vector difference component 802 _(x,y) and the bin positionwhich is either 1 or 2 due to the cutoff value being two. Accordingly,other already decoded bins/syntax elements/mvd components 802 _(x,y) donot influence the context selection.

Likewise, the reconstructor 404 may be configured to reduce theinformation content to be transferred by way of the motion vectordifferences further (beyond the spatial and/or temporal prediction ofmotion vectors) by using a multi-hypothesis prediction concept accordingto which, firstly, a list of motion vector predictors is generated foreach block or merge group, with then, explicitly or implicitlytransmitting within the data stream information on the index of thepredictor to be actually used to predict the motion vector difference.See, for example, the non-shaded block 122 in FIG. 20. The reconstructor404 may provide different predictors for the motion vector of this blocksuch as by predicting the motion vector spatially such as from the left,from the top, a combination of both and so forth, and temporallypredicting the motion vector from the motion vector of a co-locatedportion of a previously-decoded picture of the video and furthercombinations of the afore-mentioned predictors. These predictors aresorted by reconstructor 404 in a predictable manner which isforecastable at the encoding side. Some information is conveyed to thisend within the datastream and used by the reconstructor. That is, somehint is contained in the data stream, as to which predictor out of thisordered list of predictors shall be actually used as a predictor for themotion vector of this block. This index may be transmitted within thedata stream for this block explicitly. However, it is also possible thatthe index is firstly predicted and then merely a prediction of thattransmitted. Other possibilities exist as well. In any case, thejust-mentioned prediction scheme enables a very accurate prediction ofthe motion vector of the current block and accordingly, the informationcontent requirement imposed into the motion vector difference isreduced. Accordingly, the restriction of the context-adaptive entropycoding onto merely two bins of the truncated unary code and a reductionof the cutoff value down to 2 as described with respect to FIG. 18, aswell as the selection of the order of the exponential Golomb code to be1, does not negatively affect the coding efficiency since the motionvector differences show, due to the high prediction efficiency, afrequency histogram according to which higher values of the motionvector difference components 802 x,y are less frequently visited. Eventhe omission of any distinguishing between horizontal and verticalcomponents fits to the efficient prediction, as the prediction tends tooperate equally well in both directions of the prediction accuracy ishigh.

It is essential to note that in the above description, the whole detailsprovided with the FIGS. 1-15 are also transferable onto the entitiesshown in FIG. 16 such as, for example, as far as the functionality ofthe desymbolizer 314, the reconstructor 404 and the entropy decoder 409is concerned. Nevertheless, for the sake of completeness, some of thesedetails are again outlined below.

For a better understanding of the just-outlined prediction scheme, seeFIG. 20. As just-described, the constructor 404 may obtain differentpredictors for a current block 822 or a current merge group of blocks,with these predictors being shown by solid-line vectors 824. Thepredictors may be obtained by spatial and/or temporal predictionwherein, additionally, arithmetic mean operations or the like may beused so that the individual predictors may have been obtained byreconstructor 404 in a way so that the same correlate with each other.Independent from the way vectors 826 have been obtained, reconstructor404 sequentializes or sorts these predictors 126 into an ordered list.This is illustrated by numbers 1 to 4 in FIG. 21. It is advantageous ifthe sorting process is uniquely determinable so that encoder and decodermay operate synchronously. Then, the just-mentioned index may beobtained by reconstructor 404 for the current block, or merge group, outof the data stream, explicitly or implicitly. For example, the secondpredictor “2” may have been selected and the reconstructor 404 adds themotion vector difference 800 to this selected predictor 126, therebyyielding the finally reconstructed motion vector 128 which is then usedto predict, by motion-compensated prediction, the content of the currentblock/merge group. In case of the merge group, it would be possible thatthe reconstructor 404 comprises further motion vector differencesprovided for blocks of the merge group, in order to further refine themotion vector 128 with respect to the individual blocks of the mergegroup.

Thus, proceeding further with the description of the implementations ofthe entities shown in FIG. 16, it may be that entropy decoder 409 isconfigured to derive the truncated unary code 806 from the data stream401 using binary arithmetic decoding or binary PIPE coding. Bothconcepts have been described above. Further, the entropy decoder 409 maybe configured to use different contexts for the two bin positions of thetruncated unary code 806 or, alternatively, even the same context forboth bins. The entropy decoder 409 could be configured to perform aprobability state update. The entropy decoder 409 could do this by, fora bin currently derived out of the truncated unary code 806,transitioning from a current probability state associated with thecontext selected for the bin currently derived, to a new probabilitystate depending on the bin currently derived. See above tablesNext_State_LPS and Next_State_MPS the table look-up with respect towhich is performed by the entropy decoder in addition to the other steps0 to 5 listed above. In the above discussion, the current probabilitystate has been mentioned by pState_current. It is defined for therespective context of interest. The entropy decoder 409 may beconfigured to binary arithmetically decode a bin currently to be derivedout of the truncated unary code 806 by quantizing a current probabilityinterval width value, i.e. R, representing a current probabilityinterval to obtain a probability interval index, q_index, and performingan interval subdivision by indexing a table entry among table entriesusing the probability interval index and a probability state index, i.e.p_state, which, in turn, depends on the current probability stateassociated with the context selected for the bin currently to bederived, to obtain a subdivision of the current probability intervalinto two partial intervals. In the above-outlined embodiments, thesepartial intervals were associated with the most probable and leastprobable symbol. As described above, the entropy decoder 409 may beconfigured to use an eight-bit representation for the currentprobability interval width value R with grabbing-out, for example, twoor three, most significant bits of the eight-bit representation andquantizing the current probability interval width value. The entropydecoder 409 may further be configured to select among the two partialintervals based on an offset state value from an interior of the currentprobability interval, namely V, update the probability interval widthvalue R and the offset state value, and infer a value of the bincurrently to be derived, using the selected partial interval and performa renormalization of the updated probability interval width value R andthe offset state value V including a continuation of reading bits fromthe data stream 401. The entropy decoder 409 may, for example, beconfigured to binary arithmetic decode a bin out of the exponentialGolomb code by halving the current probability interval width value toobtain a subdivision of the current probability interval into twopartial intervals. The halving corresponds to a probability estimatewhich is fixed and equal to 0.5. It may be implemented by a simple bitshift. The entropy decoder may further be configured to, for each motionvector difference, derive the truncated unary code of the horizontal andvertical components of the respective motion vector difference from thedata stream 401, prior to the exponential golomb code of the horizontaland vertical components of the respective motion vector difference. Bythis measure, the entropy decoder 409 may exploit that a higher numberof bins together form a run of bins for which the probability estimateis fixed, namely 0.5. This may speed up the entropy decoding procedure.On the other hand, the entropy decoder 409 may maintain the order amongthe motion vector differences by firstly deriving horizontal andvertical components of one motion vector difference with merely thenproceeding to derive the horizontal and vertical components of the nextmotion vector difference. By this measure, the memory requirementsimposed onto the decoding entity, i.e. decoder of FIG. 16, is reduced asthe desymbolizer 314 may proceed with debinarizing the motion vectordifferences immediately without having to wait for a scan to furthermotion vector differences. This is enabled by the context selection: asmerely exactly one context is available per bin position of the code806, no spatial interrelationship has to be inspected.

The reconstructor 404 may, as described above, spatially and/ortemporally predict the horizontal and vertical components of motionvectors so as to obtain predictors 126 for the horizontal and verticalcomponents of the motion vector and reconstruct the horizontal andvertical components of the motion vectors by refining the predictors 826using the horizontal and vertical components of the motion vectordifferences, such as simply by adding the motion vector difference tothe respective predictor.

Further, the reconstructor 404 may be configured to predict thehorizontal and vertical components of motion vectors in differentmanners so as to obtain an ordered list of predictors for the horizontaland vertical component of motion vectors, obtain an list index from thedata stream and reconstruct the horizontal and vertical components ofmotion vectors by refining the predictor to which a predictor of thelist to which the list index points using the horizontal and verticalcomponents of the motion vector differences.

Further, as has already been described above, the reconstructor 404 maybe configured to reconstruct the video using the motion-compensatedprediction by applying the horizontal and vertical component 802 x,y ofthe motion vectors at a spatial granularity defined by a subdivision ofthe video's pictures into blocks wherein the reconstructor 404 may usemerging syntax elements present in the data stream 401 so as to groupthe blocks into merge groups and apply the integer values of thehorizontal and vertical components 802 x,y of the motion vectordifferences obtained by the binarizer 314, in units of merge groups.

The reconstructor 404 may derive the subdivision of the video's picturesinto blocks from a portion of the data stream 401 which excludes themerging syntax elements. The reconstructor 404 may also adapt thehorizontal and vertical components of the predetermined motion vectorfor all blocks of an associated merge group, or refine same by thehorizontal and vertical components of the motion vector differencesassociated with the blocks of the merge group.

For sake of completeness only, FIG. 17 shows an encoder fitting to thedecoder of FIG. 16. The encoder of FIG. 17 comprises a constructor 504,a symbolizer 507 and an entropy encoder 513. The encoder comprises aconstructor 504 configured to predictively code the video 505 by motioncompensated prediction using motion vectors and predictively coding themotion vectors by predicting the motion vectors and setting integervalues 506 of horizontal and vertical components of motion vectordifferences to represent a prediction error of the predicted motionvectors; a symbolizer 507 configured to binarize the integer values toobtain binarizations 508 of the horizontal and vertical components ofthe motion vector differences, the binarizations equaling a truncatedunary code of the horizontal and vertical components, respectively,within a first interval of the domain of the horizontal and verticalcomponents below a cutoff value, and a combination of a prefix in formof the truncated unary code for the cutoff value and a suffix in form ofa Exp-Golomb code of the horizontal and vertical components,respectively, within a second interval of the domain of the horizontaland vertical components inclusive and above the cutoff value, whereinthe cutoff value is two and the Exp-Golomb code has order one; and anentropy encoder 513 configured to, for the horizontal and verticalcomponents of the motion vector differences, encode the truncated unarycode into the data stream using context-adaptive binary entropy encodingwith exactly one context per bin position of the truncated unary code,which is common for the horizontal and vertical components of the motionvector differences, and the Exp-Golomb code using a constantequi-probability bypass mode. Further possible implementation detailsare directly transferable from the description regarding the decoder ofFIG. 16 onto the encoder of FIG. 17.

Although some aspects have been described in the context of anapparatus, it is clear that these aspects also represent a descriptionof the corresponding method, where a block or device corresponds to amethod step or a feature of a method step. Analogously, aspectsdescribed in the context of a method step also represent a descriptionof a corresponding block or item or feature of a correspondingapparatus. Some or all of the method steps may be executed by (or using)a hardware apparatus, like for example, a microprocessor, a programmablecomputer or an electronic circuit. In some embodiments, some one or moreof the most important method steps may be executed by such an apparatus.

The inventive encoded signal can be stored on a digital storage mediumor can be transmitted on a transmission medium such as a wirelesstransmission medium or a wired transmission medium such as the Internet.

Depending on certain implementation requirements, embodiments of theinvention can be implemented in hardware or in software. Theimplementation can be performed using a digital storage medium, forexample a floppy disk, a DVD, a Blue-Ray, a CD, a ROM, a PROM, an EPROM,an EEPROM or a FLASH memory, having electronically readable controlsignals stored thereon, which cooperate (or are capable of cooperating)with a programmable computer system such that the respective method isperformed. Therefore, the digital storage medium may be computerreadable.

Some embodiments according to the invention comprise a data carrierhaving electronically readable control signals, which are capable ofcooperating with a programmable computer system, such that one of themethods described herein is performed.

Generally, embodiments of the present invention can be implemented as acomputer program product with a program code, the program code beingoperative for performing one of the methods when the computer programproduct runs on a computer. The program code may for example be storedon a machine readable carrier.

Other embodiments comprise the computer program for performing one ofthe methods described herein, stored on a machine readable carrier.

In other words, an embodiment of the inventive method is, therefore, acomputer program having a program code for performing one of the methodsdescribed herein, when the computer program runs on a computer.

A further embodiment of the inventive methods is, therefore, a datacarrier (or a digital storage medium, or a computer-readable medium)comprising, recorded thereon, the computer program for performing one ofthe methods described herein. The data carrier, the digital storagemedium or the recorded medium are typically tangible and/ornon-transitionary.

A further embodiment of the inventive method is, therefore, a datastream or a sequence of signals representing the computer program forperforming one of the methods described herein. The data stream or thesequence of signals may for example be configured to be transferred viaa data communication connection, for example via the Internet.

A further embodiment comprises a processing means, for example acomputer, or a programmable logic device, configured to or adapted toperform one of the methods described herein.

A further embodiment comprises a computer having installed thereon thecomputer program for performing one of the methods described herein.

A further embodiment according to the invention comprises an apparatusor a system configured to transfer (for example, electronically oroptically) a computer program for performing one of the methodsdescribed herein to a receiver. The receiver may, for example, be acomputer, a mobile device, a memory device or the like. The apparatus orsystem may, for example, comprise a file server for transferring thecomputer program to the receiver.

In some embodiments, a programmable logic device (for example a fieldprogrammable gate array) may be used to perform some or all of thefunctionalities of the methods described herein. In some embodiments, afield programmable gate array may cooperate with a microprocessor inorder to perform one of the methods described herein. Generally, themethods are performed by any hardware apparatus.

While this invention has been described in terms of several advantageousembodiments, there are alterations, permutations, and equivalents whichfall within the scope of this invention. It should also be noted thatthere are many alternative ways of implementing the methods andcompositions of the present invention. It is therefore intended that thefollowing appended claims be interpreted as including all suchalterations, permutations, and equivalents as fall within the truespirit and scope of the present invention.

What is claimed:
 1. A decoder for decoding a video encoded in a datastream, wherein the video is predictively decoded by motion compensatedprediction using motion vectors and motion vector differences, thedecoder comprising: an entropy decoder configured to, for horizontal andvertical components of each of the motion vector differences, obtain,from the data stream, two fixed-length binary codes and an Exp-Golombcode, wherein a first of the two fixed-length binary codes indicateswhether an absolute value of a motion vector difference is greater thanzero and a second of the two fixed-length binary codes indicates whetherthe absolute value of the motion vector difference is greater than one,and the Exp-Golomb code represents a difference between the absolutevalue of the motion vector difference and a fixed value, decode each ofthe two fixed-length binary codes using context-adaptive binary entropydecoding with exactly one context associated with the respectivefixed-length binary code, wherein the context is shared by thehorizontal and vertical components of the motion vector difference, anddecode the Exp-Golomb code using a constant equi-probability bypassmode, to obtain the horizontal and vertical components of the motionvector difference; and a reconstructor configured to reconstruct thevideo based on the horizontal and vertical components of the motionvector differences.
 2. The decoder according to claim 1, wherein theentropy decoder is configured to use different contexts for the twofixed-length binary codes.
 3. The decoder according to claim 1, wherein,as part of decoding each of the two fixed-length binary codes, theentropy decoder is configured to perform a probability state update bytransitioning from a current probability state associated with thecontext selected for the fixed-length binary code being currentlydecoded, to a new probability state depending on the fixed-length binarycode being currently decoded.
 4. The decoder according to claim 1,wherein, as part of decoding each of the two fixed-length binary codes,the entropy decoder is configured to quantize a current probabilityinterval width value representing a current probability interval toacquire a probability interval index, and perform an intervalsubdivision by indexing a table entry among table entries using theprobability interval index and a probability state index depending on acurrent probability state associated with the context selected for thefixed-length binary code being currently decoded, to acquire asub-division of the current probability interval into two partialintervals.
 5. The decoder according to claim 4, wherein the entropydecoder is configured to use an 8-bit representation for the currentprobability interval width value and to obtain 2 or 3 most significantbits of the 8-bit representation in quantizing the current probabilityinterval width value.
 6. The decoder according to claim 4, wherein theentropy decoder is configured to select a partial interval from the twopartial intervals based on an offset state value from an interior of thecurrent probability interval, update the probability interval widthvalue and the offset state value, and infer a value of the fixed-lengthbinary code being currently decoded, using the selected partial intervaland perform a renormalization of the updated probability interval widthvalue and the offset state value comprising a continuation of readingbits from the data stream.
 7. The decoder according to claim 4, whereinthe entropy decoder is configured to, in the constant equi-probabilitybypass mode, binary arithmetic decode a bin out of the Exp-Golomb codeby halving the current probability interval width value to acquire asub-division of the current probability interval into two partialintervals.
 8. The decoder according to claim 1, wherein the entropydecoder is configured to, for each motion vector difference, derive thetwo fixed-length binary codes of the horizontal and vertical componentsof the respective motion vector difference from the data stream, priorto deriving the Exp-Golomb code of the horizontal and verticalcomponents of the respective motion vector difference.
 9. The decoderaccording to claim 1, wherein the reconstructor is configured tospatially and/or temporally predict the horizontal and verticalcomponents of motion vectors so as to acquire predictors for thehorizontal and vertical components of the motion vectors and reconstructthe horizontal and vertical components of the motion vectors by refiningthe predictors using the horizontal and vertical components of themotion vector differences.
 10. The decoder according to claim 1, whereinthe reconstructor is configured to predict the horizontal and verticalcomponents of motion vectors in different manners so as to obtain anordered list of predictors for the horizontal and vertical components ofmotion vectors, obtain from the data stream a list index correspondingto a predictor in the ordered list, and reconstruct the horizontal andvertical components of motion vectors by refining the predictorindicated by the list index using the horizontal and vertical componentsof the motion vector differences.
 11. The decoder according to claim 9,wherein the reconstructor is configured to reconstruct the video usingmotion-compensated prediction by use of the horizontal and verticalcomponents of motion vectors.
 12. The decoder according to claim 11,wherein the reconstructor is configured to reconstruct the video usingthe motion-compensated prediction by applying the horizontal andvertical components of motion vectors at a spatial granularity definedby a sub-division of the video's pictures in blocks, wherein thereconstructor uses merging syntax elements present in the data stream soas to group the blocks into merge groups and apply the horizontal andvertical components of the motion vector differences, in units of mergegroups.
 13. The decoder according to claim 1, wherein the data streamcomprises at least a portion associated with color samples.
 14. Thedecoder according to claim 1, wherein the data stream comprises at leasta portion associated with depth values related to a depth map.
 15. Anencoder for encoding a video into a data stream, comprising: aconstructor configured to predictively code the video by motioncompensated prediction using motion vectors and horizontal and verticalcomponents of motion vector differences; and an entropy encoderconfigured to, for horizontal and vertical components of each of themotion vector differences, encode, into the data stream, each of twofixed-length binary codes coded using context-adaptive binary entropyencoding with exactly one context associated with the respectivefixed-length binary code, the context being shared by the horizontal andvertical components of the motion vector difference, wherein a first ofthe two fixed-length binary codes indicates whether an absolute value ofa motion vector difference is greater than zero and a second of the twofixed-length binary codes indicates whether the absolute value of themotion vector difference is greater than one, and encode, into the datastream, an Exp-Golomb code coded using a constant equi-probabilitybypass mode, wherein the Exp-Golomb code represents a difference betweenthe absolute value of the motion vector difference and a fixed value.16. The encoder according to claim 15, wherein the entropy encoder isconfigured to use different contexts for the two fixed-length binarycodes.
 17. The encoder according to claim 15, wherein, as part ofencoding each of the two fixed-length binary codes, the entropy encoderis configured to perform a probability state update by transitioningfrom a current probability state associated with the context selectedfor the fixed-length binary code being currently encoded, to a newprobability state depending on the fixed-length binary code beingcurrently encoded.
 18. The encoder according to claim 15, wherein, aspart of encoding each of the two fixed-length binary codes, the entropyencoder is configured to quantize a current probability interval widthvalue representing a current probability interval to obtain aprobability interval index, and perform an interval subdivision byindexing a table entry among tables entries using the probabilityinterval index and a probability state index depending on a currentprobability state associated with the context selected for thefixed-length binary code being currently encoded, to obtain asub-division of the current probability interval into two partialintervals.
 19. The encoder according to claim 15, wherein theconstructor is configured to predict the horizontal and verticalcomponents of the motion vectors in different manners so as to obtain aordered list of predictors for the horizontal and vertical components ofmotion vectors, obtain from the data stream a list index correspondingto a predictor in the ordered list, and determine the horizontal andvertical components of the motion vector differences so as to refine thepredictor indicated by the list index towards the horizontal andvertical components of motion vectors.
 20. The encoder according toclaim 15, wherein the entropy encoder is configured to, for each motionvector difference, encode the two fixed-length binary codes of thehorizontal and vertical components of the respective motion vectordifference into the data stream, prior to encoding the Exp-Golomb codeof the horizontal and vertical components of the respective motionvector difference.
 21. The encoder according to claim 15, wherein theconstructor is configured to spatially and/or temporally predict thehorizontal and vertical components of the motion vectors so as to obtainpredictors for the horizontal and vertical components of motion vectorsand determine the horizontal and vertical components of the motionvector differences so as to refine the predictors towards the horizontaland vertical components of motion vectors.
 22. The encoder according toclaim 18, wherein the entropy encoder is configured to select among thetwo partial intervals based on the integer value of the fixed-lengthbinary code being currently encoded, update the probability intervalwidth value and a probability interval offset using the selected partialinterval and perform a renormalization of the probability interval widthvalue and the probability interval offset comprising a continuation ofwriting bits to the data stream.
 23. The encoder according to claim 15,wherein the constructor is configured to code the video using themotion-compensated prediction by applying the horizontal and verticalcomponents of motion vectors at a spatial granularity defined by asub-division of the video's pictures in blocks, wherein the constructoris further configured to determine and insert into the data stream,merging syntax elements so as to group the blocks into merge groups andapply the horizontal and vertical components of the motion vectordifferences, in units of merge groups.
 24. The encoder according toclaim 15, wherein the data stream comprises at least a portionassociated with color samples.
 25. The encoder according to claim 15,wherein the data stream comprises at least a portion associated withdepth values related to a depth map.
 26. A method for decoding a videoencoded in a data stream, wherein the video is predictively coded bymotion compensated prediction using motion vectors and motion vectordifferences, the method comprising: for horizontal and verticalcomponents of each of the motion vector differences, obtaining, from thedata stream, two fixed-length binary codes and an Exp-Golomb code,wherein a first of the two fixed-length binary codes indicates whetheran absolute value of a motion vector difference is greater than zero anda second of the two fixed-length binary codes indicates whether theabsolute value of the motion vector difference is greater than one, andthe Exp-Golomb code represents a difference between the absolute valueof the motion vector difference and a fixed value, decoding each of thetwo fixed-length binary codes using context-adaptive binary entropydecoding with exactly one context associated with the respectivefixed-length binary code, wherein the context is shared by thehorizontal and vertical components of the motion vector difference, anddecoding the Exp-Golomb code using a constant equi-probability bypassmode, to obtain the horizontal and vertical components of the motionvector difference; and reconstructing the video based on the horizontaland vertical components of the motion vector differences.
 27. A computerprogram stored on a non-transitory computer-readable medium comprising aprogram code for performing, when executed on a computer, a methodaccording to claim
 26. 28. A non-transitory computer-readable medium forstoring data associated with a video, comprising: a data stream storedin the non-transitory computer-readable medium, the data streamcomprising encoded horizontal and vertical components of motion vectordifferences, wherein the video is predictively coded by motioncompensated prediction using motion vectors encoded in the data streamand the horizontal and vertical components of motion vector differences,wherein, for horizontal and vertical components of each of the motionvector differences, each of two fixed-length binary codes are encodedusing context-adaptive binary entropy encoding with exactly one contextassociated with the respective fixed-length binary code, the contextbeing shared by the horizontal and vertical components of the motionvector difference, and an Exp-Golomb code is encoded using a constantequi-probability bypass mode, wherein a first of the two fixed-lengthbinary codes indicates whether an absolute value of a motion vectordifference is greater than zero and a second of the two fixed-lengthbinary codes indicates whether the absolute value of the motion vectordifference is greater than one, and the Exp-Golomb code represents adifference between the absolute value of the motion vector differenceand a fixed value.